From 4fa13152af92dd862f8f4b9ae0c207a9134e2ca5 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Tue, 23 Aug 2011 19:58:47 -0700 Subject: [PATCH] Support MSVS build directories in tools/test.py --- tools/test.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) 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):