diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2017-02-21 04:48:07 +0530 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2017-07-17 19:20:00 +0300 |
commit | 37057abfefcc77be5d5350928421ae24e8b621af (patch) | |
tree | b8d7aced5fb3e437484b23d53c79d6d5ee8a28d0 | |
parent | 5660c766ab276f91e9b8f79dbbea9cebbe17a395 (diff) | |
download | meson-37057abfefcc77be5d5350928421ae24e8b621af.zip meson-37057abfefcc77be5d5350928421ae24e8b621af.tar.gz meson-37057abfefcc77be5d5350928421ae24e8b621af.tar.bz2 |
unittests: Check value of cc.is_64 with MSVC
-rwxr-xr-x | run_unittests.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/run_unittests.py b/run_unittests.py index e286a66..a6448ba 100755 --- a/run_unittests.py +++ b/run_unittests.py @@ -1006,6 +1006,13 @@ class AllPlatformTests(BasePlatformTests): self.assertTrue(is_windows()) self.assertIsInstance(linker, lib) self.assertEqual(cc.id, 'msvc') + self.assertTrue(hasattr(cc, 'is_64')) + # If we're in the appveyor CI, we know what the compiler will be + if 'arch' in os.environ: + if os.environ['arch'] == 'x64': + self.assertTrue(cc.is_64) + else: + self.assertFalse(cc.is_64) # Set evar ourselves to a wrapper script that just calls the same # exelist + some argument. This is meant to test that setting # something like `ccache gcc -pipe` or `distcc ccache gcc` works. @@ -1031,6 +1038,8 @@ class AllPlatformTests(BasePlatformTests): self.assertEqual(wlinker.get_exelist(), wrapperlinker) # Ensure that the version detection worked correctly self.assertEqual(cc.version, wcc.version) + if hasattr(cc, 'is_64'): + self.assertEqual(cc.is_64, wcc.is_64) def test_always_prefer_c_compiler_for_asm(self): testdir = os.path.join(self.common_test_dir, '141 c cpp and asm') |