diff options
author | Xavier Claessens <xavier.claessens@collabora.com> | 2022-04-13 09:35:52 -0400 |
---|---|---|
committer | Xavier Claessens <xclaesse@gmail.com> | 2022-04-30 15:01:28 -0400 |
commit | 18bec0d3e31884dc493a03741b2ec9fef17047ee (patch) | |
tree | 664758d944e498fdb2e3d4eddd135325be7d3e85 /unittests | |
parent | c08ee0f7bc310c9721247ba7398ec8f651ceac06 (diff) | |
download | meson-18bec0d3e31884dc493a03741b2ec9fef17047ee.zip meson-18bec0d3e31884dc493a03741b2ec9fef17047ee.tar.gz meson-18bec0d3e31884dc493a03741b2ec9fef17047ee.tar.bz2 |
pkgconfig: Use EnvironmentVariables to build PKG_CONFIG_* env
The new get_env() method that returns an EnvironmentVariables object
will be needed in next commit that will pass it to CustomTarget.
This has the side effect to use the proper os specific path separator
instead of hardcoding `:`. It is the obvious right thing to do here, but
has caused issues in the past. Hopefully issues have been fixed in the
meantime. If not, better deal with fallouts than keep doing the wrong
thing forever.
Diffstat (limited to 'unittests')
-rw-r--r-- | unittests/linuxliketests.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/unittests/linuxliketests.py b/unittests/linuxliketests.py index 2177cdd..ed6c959 100644 --- a/unittests/linuxliketests.py +++ b/unittests/linuxliketests.py @@ -1152,9 +1152,12 @@ class LinuxlikeTests(BasePlatformTests): env = get_fake_env(testdir, self.builddir, self.prefix) env.coredata.set_options({OptionKey('pkg_config_path'): pkg_dir}, subproject='') - PkgConfigDependency.setup_env({}, env, MachineChoice.HOST, pkg_dir) + # Regression test: This used to modify the value of `pkg_config_path` + # option, adding the meson-uninstalled directory to it. + PkgConfigDependency.setup_env({}, env, MachineChoice.HOST, uninstalled=True) + pkg_config_path = env.coredata.options[OptionKey('pkg_config_path')].value - self.assertEqual(len(pkg_config_path), 1) + self.assertEqual(pkg_config_path, [pkg_dir]) @skipIfNoPkgconfig def test_pkgconfig_internal_libraries(self): |