Skip to content

Commit

Permalink
test: more robust check for location of node.exe
Browse files Browse the repository at this point in the history
look for the actual produced `exe` not just the directory

PR-URL: #12120
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Gibson Fahnestock <[email protected]>
Reviewed-By: Nikolai Vavilov <[email protected]>
  • Loading branch information
refack authored and MylesBorins committed Apr 19, 2017
1 parent a93eaa4 commit 49ee30b
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions tools/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 49ee30b

Please sign in to comment.