aboutsummaryrefslogtreecommitdiff
path: root/run_unittests.py
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.com>2020-08-11 10:53:36 -0400
committerNirbheek Chauhan <nirbheek.chauhan@gmail.com>2020-08-12 13:38:55 +0000
commit435db359622ca6507a087b6bdcb2a977b3d3b8a4 (patch)
treea14bfb6ff347549d869fbab3da9f2a3863a5fae0 /run_unittests.py
parent4b0e1850a00431fe34b4e8087865f51225fe027d (diff)
downloadmeson-435db359622ca6507a087b6bdcb2a977b3d3b8a4.zip
meson-435db359622ca6507a087b6bdcb2a977b3d3b8a4.tar.gz
meson-435db359622ca6507a087b6bdcb2a977b3d3b8a4.tar.bz2
interpreter: Don't force fallback when subproject failed to configure
Fixes: #7534
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-xrun_unittests.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/run_unittests.py b/run_unittests.py
index 7044d5e..97b3b58 100755
--- a/run_unittests.py
+++ b/run_unittests.py
@@ -7127,6 +7127,24 @@ c = ['{0}']
build_rpath = get_rpath(os.path.join(self.builddir, 'prog'))
self.assertIsNone(build_rpath)
+ def test_lookup_system_after_broken_fallback(self):
+ # Just to generate libfoo.pc so we can test system dependency lookup.
+ testdir = os.path.join(self.common_test_dir, '47 pkgconfig-gen')
+ self.init(testdir)
+ privatedir = self.privatedir
+
+ # Write test project where the first dependency() returns not-found
+ # because 'broken' subproject does not exit, but that should not prevent
+ # the 2nd dependency() to lookup on system.
+ self.new_builddir()
+ with tempfile.TemporaryDirectory() as d:
+ with open(os.path.join(d, 'meson.build'), 'w') as f:
+ f.write(textwrap.dedent('''\
+ project('test')
+ dependency('notfound', fallback: 'broken', required: false)
+ dependency('libfoo', fallback: 'broken', required: true)
+ '''))
+ self.init(d, override_envvars={'PKG_CONFIG_LIBDIR': privatedir})
class BaseLinuxCrossTests(BasePlatformTests):
# Don't pass --libdir when cross-compiling. We have tests that