aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2022-11-17 02:08:11 -0500
committerEli Schwartz <eschwartz@archlinux.org>2022-11-17 19:10:51 -0500
commitb40e4de3c6cfd931a2c0d9ba8b798bfacd3662c6 (patch)
tree1483c034d71e53e15e9ef143212209936e51a8ab
parent908a78dbc249b8f9db5d5404ccd08809ea1964ef (diff)
downloadmeson-b40e4de3c6cfd931a2c0d9ba8b798bfacd3662c6.zip
meson-b40e4de3c6cfd931a2c0d9ba8b798bfacd3662c6.tar.gz
meson-b40e4de3c6cfd931a2c0d9ba8b798bfacd3662c6.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):
'''