aboutsummaryrefslogtreecommitdiff
path: root/run_unittests.py
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2020-03-20 12:57:24 -0400
committerJussi Pakkanen <jpakkane@gmail.com>2020-03-23 17:14:00 +0200
commitf6b0425576640e1613f64503951c7c604b868947 (patch)
treebff1f20362777c8f2d171c860a8af876f10db7b2 /run_unittests.py
parente2b4e99d71524e0f6535838c2e40a1934fdb2824 (diff)
downloadmeson-f6b0425576640e1613f64503951c7c604b868947.zip
meson-f6b0425576640e1613f64503951c7c604b868947.tar.gz
meson-f6b0425576640e1613f64503951c7c604b868947.tar.bz2
Fix linker evn var tests
Just because we are on windows doesn't mean we can use `link`. This ought to be done better, but this will do for now.
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-xrun_unittests.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/run_unittests.py b/run_unittests.py
index 957e1b1..962ab5d 100755
--- a/run_unittests.py
+++ b/run_unittests.py
@@ -4989,14 +4989,24 @@ class WindowsTests(BasePlatformTests):
self.assertEqual(comp.linker.id, expected)
def test_link_environment_variable_lld_link(self):
+ env = get_fake_env()
+ comp = getattr(env, 'detect_c_compiler')(MachineChoice.HOST)
+ if isinstance(comp, mesonbuild.compilers.GnuLikeCompiler):
+ raise unittest.SkipTest('GCC cannot be used with link compatible linkers.')
self._check_ld('lld-link', 'c', 'lld-link')
def test_link_environment_variable_link(self):
- if shutil.which('gcc'):
- raise unittest.SkipTest('GCC can not used with link.exe.')
+ env = get_fake_env()
+ comp = getattr(env, 'detect_c_compiler')(MachineChoice.HOST)
+ if isinstance(comp, mesonbuild.compilers.GnuLikeCompiler):
+ raise unittest.SkipTest('GCC cannot be used with link compatible linkers.')
self._check_ld('link', 'c', 'link')
def test_link_environment_variable_optlink(self):
+ env = get_fake_env()
+ comp = getattr(env, 'detect_c_compiler')(MachineChoice.HOST)
+ if isinstance(comp, mesonbuild.compilers.GnuLikeCompiler):
+ raise unittest.SkipTest('GCC cannot be used with link compatible linkers.')
self._check_ld('optlink', 'c', 'optlink')
@skip_if_not_language('rust')