diff options
author | Antoine Jacoutot <ajacoutot@openbsd.org> | 2019-05-13 00:26:44 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2019-05-13 02:46:51 +0300 |
commit | e2f6f47fa3bb4034d9cc8fa84d17dfa3d5715e39 (patch) | |
tree | 0f980b7088fddd68ccaebcd72245b2fa04085138 | |
parent | 81170a9cbed4106cbb8129a5991ad52451d29275 (diff) | |
download | meson-e2f6f47fa3bb4034d9cc8fa84d17dfa3d5715e39.zip meson-e2f6f47fa3bb4034d9cc8fa84d17dfa3d5715e39.tar.gz meson-e2f6f47fa3bb4034d9cc8fa84d17dfa3d5715e39.tar.bz2 |
unittests: adapt pkg-config test for OpenBSD
pkg-config(1) on OpenBSD is not the one from freedesktop.org and hence has
subtle differences (which don't impact real usage). The meson test fails
because white space between operators are stripped by our pkg-config:
$ grep Require /usr/local/lib/pkgconfig/xmlsec1.pc
Requires: libxml-2.0 >= 2.8.0 libxslt >= 1.0.20
$ pkg-config --print-requires xmlsec1
libxml-2.0>=2.8.0
libxslt>=1.0.20
-rwxr-xr-x | run_unittests.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/run_unittests.py b/run_unittests.py index 7a7c006..dd19fa0 100755 --- a/run_unittests.py +++ b/run_unittests.py @@ -4249,11 +4249,17 @@ class LinuxlikeTests(BasePlatformTests): cmd = ['pkg-config', 'requires-test'] out = self._run(cmd + ['--print-requires']).strip().split('\n') - self.assertEqual(sorted(out), sorted(['libexposed', 'libfoo >= 1.0', 'libhello'])) + if not is_openbsd(): + self.assertEqual(sorted(out), sorted(['libexposed', 'libfoo >= 1.0', 'libhello'])) + else: + self.assertEqual(sorted(out), sorted(['libexposed', 'libfoo>=1.0', 'libhello'])) cmd = ['pkg-config', 'requires-private-test'] out = self._run(cmd + ['--print-requires-private']).strip().split('\n') - self.assertEqual(sorted(out), sorted(['libexposed', 'libfoo >= 1.0', 'libhello'])) + if not is_openbsd(): + self.assertEqual(sorted(out), sorted(['libexposed', 'libfoo >= 1.0', 'libhello'])) + else: + self.assertEqual(sorted(out), sorted(['libexposed', 'libfoo>=1.0', 'libhello'])) def test_pkg_unfound(self): testdir = os.path.join(self.unit_test_dir, '23 unfound pkgconfig') |