aboutsummaryrefslogtreecommitdiff
path: root/run_unittests.py
diff options
context:
space:
mode:
authorTristan Partin <tristan@partin.io>2021-03-02 16:04:21 -0600
committerXavier Claessens <xclaesse@gmail.com>2021-03-12 12:32:41 -0500
commit88013815633759fd499bde9e0173aaf9024604b1 (patch)
tree3f8d1739b5e6d408a485634cb19aded575972d64 /run_unittests.py
parenta1c8376f42c7cb6b97bd078fd9a3595258abd447 (diff)
downloadmeson-88013815633759fd499bde9e0173aaf9024604b1.zip
meson-88013815633759fd499bde9e0173aaf9024604b1.tar.gz
meson-88013815633759fd499bde9e0173aaf9024604b1.tar.bz2
Fix duplicate pkg_config_path entries
Previously builds would *potentially* get sammed with messaging at configure time that duplicate entries in an array would be an error in the future, and the cause was because the same entries were getting added over and over to pkg_config_path.p
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-xrun_unittests.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/run_unittests.py b/run_unittests.py
index 11940b3..759aa96 100755
--- a/run_unittests.py
+++ b/run_unittests.py
@@ -7318,6 +7318,18 @@ class LinuxlikeTests(BasePlatformTests):
self.assertEqual(relative_path_dep.get_link_args(), link_args)
@skipIfNoPkgconfig
+ def test_pkgconfig_duplicate_path_entries(self):
+ testdir = os.path.join(self.unit_test_dir, '111 pkgconfig duplicate path entries')
+ pkg_dir = os.path.join(testdir, 'pkgconfig')
+
+ 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)
+ pkg_config_path = env.coredata.options[OptionKey('pkg_config_path')].value
+ self.assertTrue(len(pkg_config_path) == 1)
+
+ @skipIfNoPkgconfig
def test_pkgconfig_internal_libraries(self):
'''
'''