From 656b784969028b10982faafd5dbc2f8d42e88cef Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Mon, 2 May 2022 17:10:48 +0100 Subject: [PATCH] Testing: check for unbound variables --- tests/bufr_ecc-765.sh | 2 ++ tests/include.ctest.sh.in | 2 ++ 2 files changed, 4 insertions(+) diff --git a/tests/bufr_ecc-765.sh b/tests/bufr_ecc-765.sh index de06c787c..32e6e25ae 100755 --- a/tests/bufr_ecc-765.sh +++ b/tests/bufr_ecc-765.sh @@ -19,10 +19,12 @@ tempLog=temp.${label}.log tempSupp=temp.${label}.supp tempFilt=temp.${label}.filt +set +u if test "x$ECCODES_TEST_WITH_VALGRIND" = "x"; then echo "Environment variable ECCODES_TEST_WITH_VALGRIND not defined. Test disabled" exit 0 fi +set -u # The presence of ECCODES_TEST_WITH_VALGRIND environment variable redefines # tools_dir so we reset it to its original diff --git a/tests/include.ctest.sh.in b/tests/include.ctest.sh.in index 1984f63b4..8da7bf747 100644 --- a/tests/include.ctest.sh.in +++ b/tests/include.ctest.sh.in @@ -55,6 +55,8 @@ samp_dir="@CMAKE_BINARY_DIR@/@ECCODES_SAMPLES_SUFF@" ECCODES_SAMPLES_PATH=${samp_dir} export ECCODES_SAMPLES_PATH +set -u + # Options HAVE_PRODUCT_BUFR=@HAVE_PRODUCT_BUFR@ HAVE_PRODUCT_GRIB=@HAVE_PRODUCT_GRIB@