From 3d3227a08670334732db4e79d52b4ff23fb8ce01 Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Thu, 25 Jul 2019 11:36:48 +0100 Subject: [PATCH] SUP-2894: check if Perl Test::More module is available --- tests/grib_check_param_concepts.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tests/grib_check_param_concepts.sh b/tests/grib_check_param_concepts.sh index d84ced85a..7f4a8906c 100755 --- a/tests/grib_check_param_concepts.sh +++ b/tests/grib_check_param_concepts.sh @@ -16,9 +16,15 @@ REDIRECT=/dev/null # name.def paramId.def shortName.def units.def cfVarName.def # -# Perhaps we should check whether the Test::More Perl module is available? -#perl -MTest::More -e 'print $Test::More::VERSION ."\n";' - +# Check whether the Test::More Perl module is available +set +e +perl -e 'use Test::More;' +status=$? +set -e +if [ $status -ne 0 ]; then + echo "Perl Test::More not installed. Test will be skipped" + exit 0 +fi CHECK_DEFS=$ECCODES_DEFINITION_PATH/check_grib_defs.pl