From e06b04dc809935fdd5865d59ce8a8bd28a5039f6 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Mon, 8 Jun 2020 16:08:19 -0700 Subject: 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: is not an instance of Signed-off-by: Alan Coopersmith --- run_unittests.py | 2 ++ 1 file changed, 2 insertions(+) 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): -- cgit v1.1