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>
This commit is contained in:
parent
45793b6ee2
commit
e06b04dc80
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue