aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2020-06-08 16:08:19 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2020-06-22 15:00:27 -0700
commite06b04dc809935fdd5865d59ce8a8bd28a5039f6 (patch)
tree21e10e7b7548b5160130d54ce64d0f4016a128f1
parent45793b6ee21021b69ddac5aa4560055b9b11f57b (diff)
downloadmeson-e06b04dc809935fdd5865d59ce8a8bd28a5039f6.zip
meson-e06b04dc809935fdd5865d59ce8a8bd28a5039f6.tar.gz
meson-e06b04dc809935fdd5865d59ce8a8bd28a5039f6.tar.bz2
unittests: Fix test_compiler_detection on Solaris
Accept Solaris linker in addition to GNU linker. Previously using the system provided gcc (which calls the Solaris linker) caused it to fail with: ====================================================================== FAIL: test_compiler_detection (__main__.AllPlatformTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "run_unittests.py", line 2525, in test_compiler_detection self.assertIsInstance(cc.linker, mesonbuild.linkers.GnuLikeDynamicLinkerMixin) AssertionError: <SolarisDynamicLinker: v9.2.0 `gcc`> is not an instance of <class 'mesonbuild.linkers.GnuLikeDynamicLinkerMixin'> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rwxr-xr-xrun_unittests.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/run_unittests.py b/run_unittests.py
index 72ca809..237203f 100755
--- a/run_unittests.py
+++ b/run_unittests.py
@@ -2582,6 +2582,8 @@ class AllPlatformTests(BasePlatformTests):
self.assertIsInstance(linker, ar)
if is_osx():
self.assertIsInstance(cc.linker, mesonbuild.linkers.AppleDynamicLinker)
+ elif is_sunos():
+ self.assertIsInstance(cc.linker, (mesonbuild.linkers.SolarisDynamicLinker, mesonbuild.linkers.GnuLikeDynamicLinkerMixin))
else:
self.assertIsInstance(cc.linker, mesonbuild.linkers.GnuLikeDynamicLinkerMixin)
if isinstance(cc, clangcl):