Browse Source

test: more robust check for location of `node.exe`

look for the actual produced `exe` not just the directory

PR-URL: https://github.com/nodejs/node/pull/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>
v6
Refael Ackermann 8 years ago
committed by James M Snell
parent
commit
394b6ac5cb
  1. 14
      tools/test.py

14
tools/test.py

@ -893,14 +893,12 @@ class Context(object):
# http://code.google.com/p/gyp/issues/detail?id=40 # http://code.google.com/p/gyp/issues/detail?id=40
# It will put the builds into Release/node.exe or Debug/node.exe # It will put the builds into Release/node.exe or Debug/node.exe
if utils.IsWindows(): if utils.IsWindows():
out_dir = os.path.join(dirname(__file__), "..", "out") if not exists(name + '.exe'):
if not exists(out_dir): name = name.replace('out/', '')
if mode == 'debug': name = os.path.abspath(name + '.exe')
name = os.path.abspath('Debug/node.exe')
else: if not exists(name):
name = os.path.abspath('Release/node.exe') raise ValueError('Could not find executable. Should be ' + name)
else:
name = os.path.abspath(name + '.exe')
return name return name

Loading…
Cancel
Save