diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2020-06-08 16:08:19 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2020-06-22 15:00:27 -0700 |
commit | e06b04dc809935fdd5865d59ce8a8bd28a5039f6 (patch) | |
tree | 21e10e7b7548b5160130d54ce64d0f4016a128f1 | |
parent | 45793b6ee21021b69ddac5aa4560055b9b11f57b (diff) | |
download | meson-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-x | run_unittests.py | 2 |
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): |