aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2022-11-17 02:08:11 -0500
committerNirbheek Chauhan <nirbheek@centricular.com>2022-11-21 15:43:52 +0530
commita0fe294281cad4537f0452822c2edde19e3488c4 (patch)
treea0b92b2d3b20b1d7298b4a356524bda8503c4251
parentd2bcb6e06f2c90f7aec46423c8624055fce26205 (diff)
downloadmeson-a0fe294281cad4537f0452822c2edde19e3488c4.zip
meson-a0fe294281cad4537f0452822c2edde19e3488c4.tar.gz
meson-a0fe294281cad4537f0452822c2edde19e3488c4.tar.bz2
tests: fix potential failure to verify pkg-config generation
We use a dummy project with a vague name and try to find flags for it based on the installable pkg-config files. This sort of works, generally, because it attempts to match `-lct` which doesn't exist because the test case isn't installed, and that link argument is passed directly through. Except, sometimes that library does exist. It is provided by the "freetds" project, which may be a dependency other tools. In that case, Meson finds a library, and the `dependency()` resolves to `/usr/lib/libct.so` and the test fails. Fortunately, we do have an API to say that we really want to get back the same flags pkg-config returned. Use this.
-rw-r--r--unittests/linuxliketests.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/unittests/linuxliketests.py b/unittests/linuxliketests.py
index 8dd9cfc..a594348 100644
--- a/unittests/linuxliketests.py
+++ b/unittests/linuxliketests.py
@@ -182,7 +182,7 @@ class LinuxlikeTests(BasePlatformTests):
for name in {'ct', 'ct0'}:
ct_dep = PkgConfigDependency(name, env, kwargs)
self.assertTrue(ct_dep.found())
- self.assertIn('-lct', ct_dep.get_link_args())
+ self.assertIn('-lct', ct_dep.get_link_args(raw=True))
def test_pkgconfig_gen_deps(self):
'''