aboutsummaryrefslogtreecommitdiff
path: root/run_unittests.py
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.com>2020-08-09 08:45:34 -0400
committerXavier Claessens <xclaesse@gmail.com>2020-10-16 17:42:24 -0400
commit7271b1e9423a83c56bf6e011b4f06dc6831a6d71 (patch)
treefba0896e0ff3235e04ecac58faf96ae8feda03d8 /run_unittests.py
parent254b836bd49a10dd2cb4a91771398a8d08d59dda (diff)
downloadmeson-7271b1e9423a83c56bf6e011b4f06dc6831a6d71.zip
meson-7271b1e9423a83c56bf6e011b4f06dc6831a6d71.tar.gz
meson-7271b1e9423a83c56bf6e011b4f06dc6831a6d71.tar.bz2
Machine file pkg_config_path overrides environment
This is consistent with c_args in machine file overriding CFLAGS from env. This also spotted an issue where in a native build this resulted in pkg_config_path being /bar instead of /foo: `-Dpkg_config_path=/foo -Dbuild.pkg_config_path=/bar` Fixes: #7573
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-xrun_unittests.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/run_unittests.py b/run_unittests.py
index 539ecd3..18e0f36 100755
--- a/run_unittests.py
+++ b/run_unittests.py
@@ -8373,7 +8373,7 @@ class NativeFileTests(BasePlatformTests):
else:
self.fail('Did not find werror in build options?')
- def test_builtin_options_env_overrides_conf(self):
+ def test_builtin_options_conf_overrides_env(self):
testcase = os.path.join(self.common_test_dir, '2 cpp')
config = self.helper_create_native_file({'built-in options': {'pkg_config_path': '/foo'}})
@@ -8381,7 +8381,7 @@ class NativeFileTests(BasePlatformTests):
configuration = self.introspect('--buildoptions')
for each in configuration:
if each['name'] == 'pkg_config_path':
- self.assertEqual(each['value'], ['/bar'])
+ self.assertEqual(each['value'], ['/foo'])
break
else:
self.fail('Did not find pkg_config_path in build options?')
@@ -8786,10 +8786,10 @@ class CrossFileTests(BasePlatformTests):
break
self.assertEqual(found, 4, 'Did not find all sections.')
- def test_builtin_options_env_overrides_conf(self):
+ def test_builtin_options_conf_overrides_env(self):
testcase = os.path.join(self.common_test_dir, '2 cpp')
- config = self.helper_create_cross_file({'built-in options': {'pkg_config_path': '/foo'}})
- cross = self.helper_create_cross_file({'built-in options': {'pkg_config_path': '/foo'}})
+ config = self.helper_create_cross_file({'built-in options': {'pkg_config_path': '/native'}})
+ cross = self.helper_create_cross_file({'built-in options': {'pkg_config_path': '/cross'}})
self.init(testcase, extra_args=['--native-file', config, '--cross-file', cross],
override_envvars={'PKG_CONFIG_PATH': '/bar', 'PKG_CONFIG_PATH_FOR_BUILD': '/dir'})
@@ -8797,10 +8797,10 @@ class CrossFileTests(BasePlatformTests):
found = 0
for each in configuration:
if each['name'] == 'pkg_config_path':
- self.assertEqual(each['value'], ['/bar'])
+ self.assertEqual(each['value'], ['/cross'])
found += 1
elif each['name'] == 'build.pkg_config_path':
- self.assertEqual(each['value'], ['/dir'])
+ self.assertEqual(each['value'], ['/native'])
found += 1
if found == 2:
break