aboutsummaryrefslogtreecommitdiff
path: root/run_unittests.py
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.com>2020-07-21 23:05:17 -0400
committerJussi Pakkanen <jpakkane@gmail.com>2020-07-30 18:59:10 +0300
commit40c197d524181713968ac5a1f052671744915c62 (patch)
tree4c2ce61788da9051f7ebc6b45a26c11cd3e4466e /run_unittests.py
parentbbf8533a97481685d6e840de3d44372bae5d620e (diff)
downloadmeson-40c197d524181713968ac5a1f052671744915c62.zip
meson-40c197d524181713968ac5a1f052671744915c62.tar.gz
meson-40c197d524181713968ac5a1f052671744915c62.tar.bz2
pkgconfig: Fix various corner cases
See unit tests for the exact scenarios this PR fixes.
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-xrun_unittests.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/run_unittests.py b/run_unittests.py
index 73131c7..2b0e4e1 100755
--- a/run_unittests.py
+++ b/run_unittests.py
@@ -5836,6 +5836,19 @@ class LinuxlikeTests(BasePlatformTests):
out = self._run(cmd + ['--libs'], override_envvars=env).strip().split()
self.assertEqual(out, ['-llibmain2', '-llibinternal'])
+ # See common/47 pkgconfig-gen/meson.build for description of the case this test
+ with open(os.path.join(privatedir1, 'simple2.pc')) as f:
+ content = f.read()
+ self.assertIn('Libs: -L${libdir} -lsimple2 -lz -lsimple1', content)
+
+ with open(os.path.join(privatedir1, 'simple3.pc')) as f:
+ content = f.read()
+ self.assertEqual(1, content.count('-lsimple3'))
+
+ with open(os.path.join(privatedir1, 'simple5.pc')) as f:
+ content = f.read()
+ self.assertNotIn('-lstat2', content)
+
def test_pkgconfig_uninstalled(self):
testdir = os.path.join(self.common_test_dir, '47 pkgconfig-gen')
self.init(testdir)