aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNIIBE Yutaka <[email protected]>2019-06-18 07:32:39 +0000
committerNIIBE Yutaka <[email protected]>2019-06-18 07:32:39 +0000
commit6c2fc52d72b4dbd9dac44d9c3105dc3e8a4d5605 (patch)
treebdefca2698ebe853612b349e3cc1cb1e8bd73a83
parentbuild: Take care of POSIX shell path. (diff)
downloadlibgpg-error-6c2fc52d72b4dbd9dac44d9c3105dc3e8a4d5605.tar.gz
libgpg-error-6c2fc52d72b4dbd9dac44d9c3105dc3e8a4d5605.zip
tests: Skip the test when pkg-config is too old.
* src/gpg-error-config-test.sh.in: Check pkg-config version. -- Use of sort and sed 1q for version check is taken from .m4 code in gettext. Signed-off-by: NIIBE Yutaka <[email protected]>
-rw-r--r--src/gpg-error-config-test.sh.in6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gpg-error-config-test.sh.in b/src/gpg-error-config-test.sh.in
index 2a4ad7a..02bc881 100644
--- a/src/gpg-error-config-test.sh.in
+++ b/src/gpg-error-config-test.sh.in
@@ -9,9 +9,15 @@ export PKG_CONFIG_PATH
if [ "$1" = --old-new ]; then
PKG_CONFIG_CMD=./gpg-error-config-old
else
+ pkg_config_min_version=0.29
PKG_CONFIG_SYSROOT_DIR="/var/example-target"
export PKG_CONFIG_SYSROOT_DIR
PKG_CONFIG_CMD="pkg-config gpg-error"
+ check_ver=$( ($PKG_CONFIG_CMD --version; echo $pkg_config_min_version) | \
+ sort -t '.' -n -k1,1 -k2,2 -k3,3 | sed 1q )
+ if [ $check_ver != $pkg_config_min_version ]; then
+ exit 77 # Skip tests, because it's too old
+ fi
if ! $PKG_CONFIG_CMD --exists >/dev/null; then
exit 77 # Skip tests
fi