aboutsummaryrefslogtreecommitdiff
path: root/test cases
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2016-12-03 23:34:48 +0530
committerJussi Pakkanen <jpakkane@gmail.com>2016-12-03 21:23:56 +0200
commit2f804e9074f391e8efbf4a2deb9f1cc3ebaaaf2e (patch)
tree68c5ad3a1123b5a810868407f738ccea9849a52b /test cases
parentacb0a38aac544125a1dd75bb4233b31e9f3fd7df (diff)
downloadmeson-2f804e9074f391e8efbf4a2deb9f1cc3ebaaaf2e.zip
meson-2f804e9074f391e8efbf4a2deb9f1cc3ebaaaf2e.tar.gz
meson-2f804e9074f391e8efbf4a2deb9f1cc3ebaaaf2e.tar.bz2
tests/common/51: Skip validate test if pkg-config too old
We originally skipped on Windows for the same reason, and now we need to do that for EPEL 7 and F23 which ship pkg-config 0.28 which doesn't have --validate. Closes #1129
Diffstat (limited to 'test cases')
-rw-r--r--test cases/common/51 pkgconfig-gen/meson.build16
1 files changed, 11 insertions, 5 deletions
diff --git a/test cases/common/51 pkgconfig-gen/meson.build b/test cases/common/51 pkgconfig-gen/meson.build
index 0933238..e1e41d9 100644
--- a/test cases/common/51 pkgconfig-gen/meson.build
+++ b/test cases/common/51 pkgconfig-gen/meson.build
@@ -19,11 +19,17 @@ pkgg.generate(
)
pkgconfig = find_program('pkg-config', required: false)
-if pkgconfig.found() and build_machine.system() != 'windows'
- test('pkgconfig-validation', pkgconfig,
- args: ['--validate', 'simple'],
- env: ['PKG_CONFIG_PATH=' + meson.current_build_dir() + '/meson-private' ],
- )
+if pkgconfig.found()
+ v = run_command(pkgconfig, '--version').stdout().strip()
+ if v.version_compare('>=0.29')
+ test('pkgconfig-validation', pkgconfig,
+ args: ['--validate', 'simple'],
+ env: ['PKG_CONFIG_PATH=' + meson.current_build_dir() + '/meson-private' ])
+ else
+ message('pkg-config version \'' + v + '\' too old, skipping validate test')
+ endif
+else
+ message('pkg-config not found, skipping validate test')
endif
# Test that name_prefix='' and name='libfoo' results in '-lfoo'