aboutsummaryrefslogtreecommitdiff
path: root/unittests
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2023-08-01 14:23:57 -0400
committerEli Schwartz <eschwartz@archlinux.org>2023-08-02 01:35:16 -0400
commit13f8eba9b63fe5185ba34c2690dffac651d91593 (patch)
treea8566fa922c4433fa20ecf4e5feaa0d093673463 /unittests
parent947e0f819b942951dfc251da37ef4ae83b3ea9b7 (diff)
downloadmeson-13f8eba9b63fe5185ba34c2690dffac651d91593.zip
meson-13f8eba9b63fe5185ba34c2690dffac651d91593.tar.gz
meson-13f8eba9b63fe5185ba34c2690dffac651d91593.tar.bz2
treewide: internally avoid deprecated machine file uses of "pkgconfig"
We support this in a machine file: ``` [binaries] pkgconfig = 'pkg-config' pkg-config = 'pkg-config' ``` and you can use either one, because internally we look up both. If you only set *one* of them, this plays awkwardly with setting $PKG_CONFIG, since we don't know which one you set in the machine file and the *other* one will be initialized from the environment instead. In commit 22df45a31981874310a78dde0df59a6a7c5ebb29 we changed program lookup of config-tool style dependencies to use the regular tool names and only fall back on the strange internal names. This affected the pkg-config class too. The result is that instead of preferring `pkgconfig =` followed by $PKG_CONFIG followed by `pkg-config =`, we inverted the lookup order. This is a good idea anyway, because now it behaves consistently with `find_program('pkg-config')`. Unfortunately, we documented the wrong name in a bunch of places, and also used the wrong name in various testsuite bits, which meant that if you set $PKG_CONFIG and then ran the testsuite, it would fail. Correct these references, because they are buggy. One test case expected to find_program() a native copy for convenience of testing against natively installed glib. Force it to resolve a native copy.
Diffstat (limited to 'unittests')
-rw-r--r--unittests/allplatformstests.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/unittests/allplatformstests.py b/unittests/allplatformstests.py
index 12eafd5..4327d99 100644
--- a/unittests/allplatformstests.py
+++ b/unittests/allplatformstests.py
@@ -2722,7 +2722,7 @@ class AllPlatformTests(BasePlatformTests):
with tempfile.NamedTemporaryFile(mode='w', delete=False, encoding='utf-8') as crossfile:
crossfile.write(textwrap.dedent(
'''[binaries]
- pkgconfig = '{}'
+ pkg-config = '{}'
[properties]
@@ -2749,7 +2749,7 @@ class AllPlatformTests(BasePlatformTests):
with tempfile.NamedTemporaryFile(mode='w', delete=False, encoding='utf-8') as crossfile:
crossfile.write(textwrap.dedent(
'''[binaries]
- pkgconfig = 'pkg-config'
+ pkg-config = 'pkg-config'
[properties]
pkg_config_libdir = ['{}']