Index: test/lib/TestGyp.py |
=================================================================== |
--- test/lib/TestGyp.py (revision 1224) |
+++ test/lib/TestGyp.py (working copy) |
@@ -419,6 +419,24 @@ |
ALL = 'all' |
DEFAULT = 'all' |
+ def initialize_build_tool(self): |
+ super(TestGypNinja, self).initialize_build_tool() |
+ if sys.platform == 'win32': |
+ # Compiler and linker aren't in the path by default on Windows, so we |
+ # make our "build tool" be set up + run ninja. |
Nico
2012/02/22 05:17:58
Could you share code with TestGypMSVS.initialize_b
scottmg
2012/02/22 05:59:09
Yeah... That code seems kinda busted but I was too
|
+ vspath = 'Microsoft Visual Studio 9.0\\Common7\\Tools\\vsvars32.bat' |
+ msvs_version = os.environ.get('GYP_MSVS_VERSION') |
+ if msvs_version == '2010': |
+ vspath = 'Microsoft Visual Studio 10.0\\Common7\\Tools\\vsvars32.bat' |
+ path_root = os.environ.get('PROGRAMFILES') |
+ full_path = os.path.join(path_root, vspath) |
+ if os.path.exists(full_path): |
+ self.build_tool = os.environ.get('COMSPEC', 'cmd.exe') |
+ self.helper_args = ['/c', full_path, '&&', 'ninja'] |
+ else: |
+ # Couldn't find setup, try just running default build_tool anyway. |
+ self.helper_args = [] |
+ |
def run_gyp(self, gyp_file, *args, **kw): |
TestGypBase.run_gyp(self, gyp_file, *args, **kw) |
@@ -433,6 +451,9 @@ |
target = 'all' |
arguments.append(target) |
+ if sys.platform == 'win32': |
+ arguments = self.helper_args + arguments |
+ |
kw['arguments'] = arguments |
return self.run(program=self.build_tool, **kw) |