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. 12
      tools/test.py

12
tools/test.py

@ -893,15 +893,13 @@ 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('Debug/node.exe')
else:
name = os.path.abspath('Release/node.exe')
else:
name = os.path.abspath(name + '.exe') name = os.path.abspath(name + '.exe')
if not exists(name):
raise ValueError('Could not find executable. Should be ' + name)
return name return name
def GetVmFlags(self, testcase, mode): def GetVmFlags(self, testcase, mode):

Loading…
Cancel
Save