From 76fd217e704500126ce9b2d68081d7f65ae39a66 Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Wed, 15 Aug 2018 12:00:07 +0100 Subject: [PATCH] Remove environment variable. Add 'set -x' to print trace of commands --- examples/C/include.ctest.sh.in | 7 +------ examples/C/include.sh | 7 +------ examples/F90/include.ctest.sh.in | 7 +------ examples/F90/include.sh | 8 +------- examples/python/include.ctest.sh.in | 7 +------ examples/python/include.sh | 8 +------- tests/include.ctest.sh.in | 8 ++------ tests/include.sh | 6 +----- 8 files changed, 9 insertions(+), 49 deletions(-) diff --git a/examples/C/include.ctest.sh.in b/examples/C/include.ctest.sh.in index fbddce14e..a8550e75d 100644 --- a/examples/C/include.ctest.sh.in +++ b/examples/C/include.ctest.sh.in @@ -1,11 +1,6 @@ # 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 +set -eax proj_dir=@PROJECT_SOURCE_DIR@ data_dir=@PROJECT_BINARY_DIR@/data diff --git a/examples/C/include.sh b/examples/C/include.sh index caba3c652..46033e998 100644 --- a/examples/C/include.sh +++ b/examples/C/include.sh @@ -16,12 +16,7 @@ else # This is for autotools 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 + set -x if [ -z "${data_dir}" ] then diff --git a/examples/F90/include.ctest.sh.in b/examples/F90/include.ctest.sh.in index d1d9079a8..9b522d839 100644 --- a/examples/F90/include.ctest.sh.in +++ b/examples/F90/include.ctest.sh.in @@ -1,11 +1,6 @@ # 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 +set -eax proj_dir=@PROJECT_SOURCE_DIR@ data_dir=@PROJECT_BINARY_DIR@/data diff --git a/examples/F90/include.sh b/examples/F90/include.sh index 284833728..bd85956a9 100755 --- a/examples/F90/include.sh +++ b/examples/F90/include.sh @@ -12,17 +12,11 @@ if [ -f "$CMAKE_INCLUDE_FILE" ]; then . ./$CMAKE_INCLUDE_FILE else - set -ea + set -eax 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 a812e4d05..4094adf3f 100644 --- a/examples/python/include.ctest.sh.in +++ b/examples/python/include.ctest.sh.in @@ -1,11 +1,6 @@ # 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 +set -eax data_dir=@PROJECT_BINARY_DIR@/data diff --git a/examples/python/include.sh b/examples/python/include.sh index 53341f3df..c3aab0493 100644 --- a/examples/python/include.sh +++ b/examples/python/include.sh @@ -4,16 +4,10 @@ if [ -f "$CMAKE_INCLUDE_FILE" ]; then . ./$CMAKE_INCLUDE_FILE else - set -ea + set -eax 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 diff --git a/tests/include.ctest.sh.in b/tests/include.ctest.sh.in index c4bb7931b..886fec8b6 100644 --- a/tests/include.ctest.sh.in +++ b/tests/include.ctest.sh.in @@ -1,11 +1,7 @@ set -ea # For CMake -# 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 +set -x proj_dir=@PROJECT_SOURCE_DIR@ data_dir=@PROJECT_BINARY_DIR@/data @@ -20,7 +16,7 @@ tools_dir=@CMAKE_BINARY_DIR@/bin tigge_dir=@CMAKE_BINARY_DIR@/bin # If this environment variable is set, then run the -# executables with valgrind +# test executables with valgrind if test "x$ECCODES_TEST_WITH_VALGRIND" != "x"; then tools_dir="valgrind --error-exitcode=1 -q @CMAKE_BINARY_DIR@/bin" fi diff --git a/tests/include.sh b/tests/include.sh index 8d199867b..75b23abb9 100644 --- a/tests/include.sh +++ b/tests/include.sh @@ -24,11 +24,7 @@ else # save current working dir save=`pwd` - # 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 + set -x if [ -z "${data_dir}" ] then