diff --git a/tools/test.py b/tools/test.py index 7c8156db0e..b0cd9abcd2 100755 --- a/tools/test.py +++ b/tools/test.py @@ -667,8 +667,19 @@ class Context(object): else: name = 'out/Release/node' - if utils.IsWindows() and not name.endswith('.exe'): - name = os.path.abspath(name + '.exe') + # Currently GYP does not support output_dir for MSVS. + # 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') + return name def GetVmCommand(self, testcase, mode):