Skip to content

Commit 5e95887

Browse files
committed
test: more robust check for location of node.exe
look for the actual produced `exe` not just the directory
1 parent 61ebfa8 commit 5e95887

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

tools/test.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -894,14 +894,12 @@ def GetVm(self, arch, mode):
894894
# http://code.google.com/p/gyp/issues/detail?id=40
895895
# It will put the builds into Release/node.exe or Debug/node.exe
896896
if utils.IsWindows():
897-
out_dir = os.path.join(dirname(__file__), "..", "out")
898-
if not exists(out_dir):
899-
if mode == 'debug':
900-
name = os.path.abspath('Debug/node.exe')
901-
else:
902-
name = os.path.abspath('Release/node.exe')
903-
else:
904-
name = os.path.abspath(name + '.exe')
897+
if not exists(name + '.exe'):
898+
name = name.replace('out/', '')
899+
name = os.path.abspath(name + '.exe')
900+
901+
if not exists(name):
902+
raise ValueError('Could not find executable. Should be ' + name)
905903

906904
return name
907905

0 commit comments

Comments
 (0)