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 <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Nikolai Vavilov <vvnicholas@gmail.com>
  • Loading branch information
refack authored and italoacasas committed Apr 10, 2017
1 parent 6083e7a commit a11ed6a
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 a11ed6a

Please sign in to comment.