diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2019-01-30 21:36:59 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek.chauhan@gmail.com> | 2019-01-31 20:12:21 +0530 |
commit | 00b59c9ad6cf4496c8aecc1d4de85f4828a2b701 (patch) | |
tree | 4151f01fd4b89b8d2bb5179e717961c086503d39 /run_unittests.py | |
parent | c3bc1dcd481e2a2d8d61850895ca0cd0b3736f40 (diff) | |
download | meson-00b59c9ad6cf4496c8aecc1d4de85f4828a2b701.zip meson-00b59c9ad6cf4496c8aecc1d4de85f4828a2b701.tar.gz meson-00b59c9ad6cf4496c8aecc1d4de85f4828a2b701.tar.bz2 |
pkg-config: Fix another case where we were throwing a traceback
Also add a test for it. In the process, also remove an overly-zealous
try..except statement that was catching *all* exceptions, not just
expected ones, which was masking programming errors.
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-x | run_unittests.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/run_unittests.py b/run_unittests.py index 6a4177c..f1bf5c6 100755 --- a/run_unittests.py +++ b/run_unittests.py @@ -3527,7 +3527,13 @@ class FailureTests(BasePlatformTests): if shutil.which('pkg-config'): self.assertMesonRaises("dependency('sdl2', method : 'pkg-config')", self.dnf) with no_pkgconfig(): - self.assertMesonRaises("dependency('sdl2', method : 'pkg-config')", self.nopkg) + # Look for pkg-config, cache it, then + # Use cached pkg-config without erroring out, then + # Use cached pkg-config to error out + code = "dependency('foobarrr', method : 'pkg-config', required : false)\n" \ + "dependency('foobarrr2', method : 'pkg-config', required : false)\n" \ + "dependency('sdl2', method : 'pkg-config')" + self.assertMesonRaises(code, self.nopkg) def test_gnustep_notfound_dependency(self): # Want to test failure, so skip if available |