aboutsummaryrefslogtreecommitdiff
path: root/run_unittests.py
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2017-12-02 02:29:09 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2017-12-03 10:06:11 +0530
commit4e637a69106acf3cc0dcdec6085dc797cad6bfef (patch)
treed510f302e4957ebb87c112e91b6cac15803c8d40 /run_unittests.py
parent387b5e67a03ad9ea2c17431417293cc3561badb6 (diff)
downloadmeson-4e637a69106acf3cc0dcdec6085dc797cad6bfef.zip
meson-4e637a69106acf3cc0dcdec6085dc797cad6bfef.tar.gz
meson-4e637a69106acf3cc0dcdec6085dc797cad6bfef.tar.bz2
unit tests: Fix test_compiler_detection on MinGW
The compiler is x86_64-foo-bar-gcc/g++, so also check for that.
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-xrun_unittests.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/run_unittests.py b/run_unittests.py
index f7ebd9c..2cb276c 100755
--- a/run_unittests.py
+++ b/run_unittests.py
@@ -1061,16 +1061,17 @@ class AllPlatformTests(BasePlatformTests):
evalue = os.environ.pop(evar)
# Very rough/strict heuristics. Would never work for actual
# compiler detection, but should be ok for the tests.
- if os.path.basename(evalue).startswith('g'):
+ ebase = os.path.basename(evalue)
+ if ebase.startswith('g') or ebase.endswith(('-gcc', '-g++')):
self.assertIsInstance(ecc, gnu)
self.assertIsInstance(elinker, ar)
- elif 'clang' in os.path.basename(evalue):
+ elif 'clang' in ebase:
self.assertIsInstance(ecc, clang)
self.assertIsInstance(elinker, ar)
- elif os.path.basename(evalue).startswith('ic'):
+ elif ebase.startswith('ic'):
self.assertIsInstance(ecc, intel)
self.assertIsInstance(elinker, ar)
- elif os.path.basename(evalue).startswith('cl'):
+ elif ebase.startswith('cl'):
self.assertIsInstance(ecc, msvc)
self.assertIsInstance(elinker, lib)
else: