From 5e9588799ea5ceac7f6f34c9603f28b90180c44e Mon Sep 17 00:00:00 2001 From: Refael Ackermann Date: Wed, 29 Mar 2017 10:09:04 -0400 Subject: [PATCH] test: more robust check for location of `node.exe` look for the actual produced `exe` not just the directory --- tools/test.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/tools/test.py b/tools/test.py index deeb7aeffe2e02..276c8a9e5f83ab 100755 --- a/tools/test.py +++ b/tools/test.py @@ -894,14 +894,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