diff --git a/examples/C/include.ctest.sh.in b/examples/C/include.ctest.sh.in index 67664e379..9aa68383c 100644 --- a/examples/C/include.ctest.sh.in +++ b/examples/C/include.ctest.sh.in @@ -1,6 +1,12 @@ # examples/C include file for CMake set -ea +# If this environment variable is set, then become verbose +# so one can see why and how a test failed +if test "x$ECCODES_TEST_VERBOSE_OUTPUT" != "x"; then + set -x +fi + proj_dir=@PROJECT_SOURCE_DIR@ data_dir=@PROJECT_BINARY_DIR@/data diff --git a/examples/C/include.sh b/examples/C/include.sh index 5b554fe13..29d820602 100644 --- a/examples/C/include.sh +++ b/examples/C/include.sh @@ -17,6 +17,12 @@ else echo echo "TEST: $0" + # If this environment variable is set, then become verbose + # so one can see why and how a test failed + if test "x$ECCODES_TEST_VERBOSE_OUTPUT" != "x"; then + set -x + fi + if [ -z "${data_dir}" ] then cd ../../ diff --git a/examples/F90/include.ctest.sh.in b/examples/F90/include.ctest.sh.in index c2274affe..d218654ce 100644 --- a/examples/F90/include.ctest.sh.in +++ b/examples/F90/include.ctest.sh.in @@ -1,6 +1,12 @@ # examples/F90 include file for CMake set -ea +# If this environment variable is set, then become verbose +# so one can see why and how a test failed +if test "x$ECCODES_TEST_VERBOSE_OUTPUT" != "x"; then + set -x +fi + proj_dir=@PROJECT_SOURCE_DIR@ data_dir=@PROJECT_BINARY_DIR@/data diff --git a/examples/F90/include.sh b/examples/F90/include.sh index 8f6ed4e4a..cc077ffaa 100755 --- a/examples/F90/include.sh +++ b/examples/F90/include.sh @@ -17,6 +17,12 @@ else echo echo "TEST: $0" + # If this environment variable is set, then become verbose + # so one can see why and how a test failed + if test "x$ECCODES_TEST_VERBOSE_OUTPUT" != "x"; then + set -x + fi + if [ -z "${data_dir}" ] then cd ../../ diff --git a/examples/python/include.ctest.sh.in b/examples/python/include.ctest.sh.in index 4ab82a383..d7cb03990 100644 --- a/examples/python/include.ctest.sh.in +++ b/examples/python/include.ctest.sh.in @@ -1,6 +1,12 @@ # examples/python include file for CMake set -ea +# If this environment variable is set, then become verbose +# so one can see why and how a test failed +if test "x$ECCODES_TEST_VERBOSE_OUTPUT" != "x"; then + set -x +fi + proj_dir=@PROJECT_SOURCE_DIR@ data_dir=@PROJECT_BINARY_DIR@/data diff --git a/examples/python/include.sh b/examples/python/include.sh index c6263298e..9da0aa24b 100644 --- a/examples/python/include.sh +++ b/examples/python/include.sh @@ -8,6 +8,12 @@ else echo echo "TEST: $0" + # If this environment variable is set, then become verbose + # so one can see why and how a test failed + if test "x$ECCODES_TEST_VERBOSE_OUTPUT" != "x"; then + set -x + fi + cpath=$TOPBUILDDIR ECCODES_DEFINITION_PATH=$cpath/definitions export ECCODES_DEFINITION_PATH