diff --git a/tools/test.py b/tools/test.py index 05a2dd92ae9f2f..ff9ba7cbc49172 100755 --- a/tools/test.py +++ b/tools/test.py @@ -890,14 +890,12 @@ def GetVm(self, arch, mode): # http://code.google.com/p/gyp/issues/detail?id=40 # It will put the builds into Release/node.exe or Debug/node.exe if utils.IsWindows(): - out_dir = os.path.join(dirname(__file__), "..", "out") - if not exists(out_dir): - if mode == 'debug': - name = os.path.abspath('Debug/node.exe') - else: - name = os.path.abspath('Release/node.exe') - else: - name = os.path.abspath(name + '.exe') + if not exists(name + '.exe'): + name = name.replace('out/', '') + name = os.path.abspath(name + '.exe') + + if not exists(name): + raise ValueError('Could not find executable. Should be ' + name) return name