diff options
Diffstat (limited to 'deps/gyp/pylib/gyp/generator/ninja_test.py')
-rw-r--r-- | deps/gyp/pylib/gyp/generator/ninja_test.py | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/deps/gyp/pylib/gyp/generator/ninja_test.py b/deps/gyp/pylib/gyp/generator/ninja_test.py index 52661bcdf0..1767b2f45a 100644 --- a/deps/gyp/pylib/gyp/generator/ninja_test.py +++ b/deps/gyp/pylib/gyp/generator/ninja_test.py @@ -15,15 +15,18 @@ import TestCommon class TestPrefixesAndSuffixes(unittest.TestCase): def test_BinaryNamesWindows(self): - writer = ninja.NinjaWriter('foo', 'wee', '.', '.', 'build.ninja', '.', - 'build.ninja', 'win') - spec = { 'target_name': 'wee' } - self.assertTrue(writer.ComputeOutputFileName(spec, 'executable'). - endswith('.exe')) - self.assertTrue(writer.ComputeOutputFileName(spec, 'shared_library'). - endswith('.dll')) - self.assertTrue(writer.ComputeOutputFileName(spec, 'static_library'). - endswith('.lib')) + # These cannot run on non-Windows as they require a VS installation to + # correctly handle variable expansion. + if sys.platform.startswith('win'): + writer = ninja.NinjaWriter('foo', 'wee', '.', '.', 'build.ninja', '.', + 'build.ninja', 'win') + spec = { 'target_name': 'wee' } + self.assertTrue(writer.ComputeOutputFileName(spec, 'executable'). + endswith('.exe')) + self.assertTrue(writer.ComputeOutputFileName(spec, 'shared_library'). + endswith('.dll')) + self.assertTrue(writer.ComputeOutputFileName(spec, 'static_library'). + endswith('.lib')) def test_BinaryNamesLinux(self): writer = ninja.NinjaWriter('foo', 'wee', '.', '.', 'build.ninja', '.', |