summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorscottmg@chromium.org <scottmg@chromium.org>2014-09-23 16:48:45 +0000
committerscottmg@chromium.org <scottmg@chromium.org>2014-09-23 16:48:45 +0000
commit0eedec84850c360288e00b90eae585ab4150a05b (patch)
tree551bc07a2f323ed24d7e6dbf9a696f0bfd33c423
parentce6c5076aa984698f479a62db02432ce4266fe87 (diff)
downloadgyp-0eedec84850c360288e00b90eae585ab4150a05b.tar.gz
Don't run windows tests on other platforms
Build fix TBR=timurrrr@chromium.org Review URL: https://codereview.chromium.org/598643003 git-svn-id: http://gyp.googlecode.com/svn/trunk@1979 78cadc50-ecff-11dd-a971-7dbc132099af
-rw-r--r--pylib/gyp/generator/ninja_test.py21
1 files changed, 12 insertions, 9 deletions
diff --git a/pylib/gyp/generator/ninja_test.py b/pylib/gyp/generator/ninja_test.py
index 52661bcd..1767b2f4 100644
--- a/pylib/gyp/generator/ninja_test.py
+++ b/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', '.',