aboutsummaryrefslogtreecommitdiff
path: root/run_unittests.py
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2020-01-13 23:46:09 -0500
committerDylan Baker <dylan@pnwbakers.com>2020-01-22 14:10:54 -0800
commitb51ba60b80f7c1e4dcf94ac1a45c669854d91b72 (patch)
tree5e95148573e8f2620e2a1ad49f513a7e9e8025bb /run_unittests.py
parent255fa5a320369f6a7b52f2963574a09e7e693d9a (diff)
downloadmeson-b51ba60b80f7c1e4dcf94ac1a45c669854d91b72.zip
meson-b51ba60b80f7c1e4dcf94ac1a45c669854d91b72.tar.gz
meson-b51ba60b80f7c1e4dcf94ac1a45c669854d91b72.tar.bz2
test_pkgconfig_gen_deps: set PKG_CONFIG_SYSTEM_LIBRARY_PATH=/usr/lib
pkgconf automatically prunes "system library paths" from its output. The system library paths depend on the system toolchain. A common value on a 64-bit system is as follows: /lib64:/usr/lib64:/usr/local/lib64 So, if -L/usr/lib64 appears in the Libs section, it will be pruned from the output of pkg-config --libs. The pc files generated for this test contain something like this: libdir=/usr/lib Libs: -L${libdir} ... pkgconf may not consider /usr/lib to be a system library path, so it is not pruned as the test expects. To work around this, override the compiled-in list of paths via the PKG_CONFIG_SYSTEM_LIBRARY_PATH environment variable. Fixes: https://github.com/mesonbuild/meson/issues/6004
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-xrun_unittests.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/run_unittests.py b/run_unittests.py
index 79b7018..3455dc7 100755
--- a/run_unittests.py
+++ b/run_unittests.py
@@ -4899,7 +4899,10 @@ class LinuxlikeTests(BasePlatformTests):
privatedir2 = self.privatedir
os.environ
- env = {'PKG_CONFIG_LIBDIR': os.pathsep.join([privatedir1, privatedir2])}
+ env = {
+ 'PKG_CONFIG_LIBDIR': os.pathsep.join([privatedir1, privatedir2]),
+ 'PKG_CONFIG_SYSTEM_LIBRARY_PATH': '/usr/lib',
+ }
self._run(['pkg-config', 'dependency-test', '--validate'], override_envvars=env)
# pkg-config strips some duplicated flags so we have to parse the