Skip to content

Commit a0fe294

Browse files
eli-schwartznirbheek
authored andcommitted
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.
1 parent d2bcb6e commit a0fe294

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

unittests/linuxliketests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ def test_pkgconfig_gen(self):
182182
for name in {'ct', 'ct0'}:
183183
ct_dep = PkgConfigDependency(name, env, kwargs)
184184
self.assertTrue(ct_dep.found())
185-
self.assertIn('-lct', ct_dep.get_link_args())
185+
self.assertIn('-lct', ct_dep.get_link_args(raw=True))
186186

187187
def test_pkgconfig_gen_deps(self):
188188
'''

0 commit comments

Comments
 (0)