From 969ed8934e547a169717e7edac8e3c7bed89a2c8 Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Thu, 16 Jan 2020 14:40:06 +0000 Subject: [PATCH] Testing: unset ECCODES_DEFINITION_PATH when MEMFS defined --- examples/C/include.ctest.sh.in | 5 +++++ examples/F90/include.ctest.sh.in | 5 +++++ examples/python/include.ctest.sh.in | 5 +++++ examples/python/metar_get_keys.sh | 5 ++++- 4 files changed, 19 insertions(+), 1 deletion(-) diff --git a/examples/C/include.ctest.sh.in b/examples/C/include.ctest.sh.in index 5dabcb29d..d221f0ddd 100644 --- a/examples/C/include.ctest.sh.in +++ b/examples/C/include.ctest.sh.in @@ -4,6 +4,7 @@ set -eax proj_dir=@PROJECT_SOURCE_DIR@ data_dir=@PROJECT_BINARY_DIR@/data +HAVE_MEMFS=@HAVE_MEMFS@ # use definitions from binary dir to test if installation will be correct def_dir="@CMAKE_BINARY_DIR@/@ECCODES_DEFINITION_SUFF@" @@ -20,6 +21,10 @@ if test "x$ECCODES_TEST_WITH_VALGRIND" != "x"; then examples_dir="valgrind --error-exitcode=1 -q $examples_dir" fi +if [ $HAVE_MEMFS -eq 1 ]; then + unset ECCODES_DEFINITION_PATH +fi + # use samples from binary dir to test if installation will be correct samp_dir="@CMAKE_BINARY_DIR@/@ECCODES_SAMPLES_SUFF@" ECCODES_SAMPLES_PATH=${samp_dir} diff --git a/examples/F90/include.ctest.sh.in b/examples/F90/include.ctest.sh.in index 9b522d839..e73107145 100644 --- a/examples/F90/include.ctest.sh.in +++ b/examples/F90/include.ctest.sh.in @@ -4,6 +4,7 @@ set -eax proj_dir=@PROJECT_SOURCE_DIR@ data_dir=@PROJECT_BINARY_DIR@/data +HAVE_MEMFS=@HAVE_MEMFS@ # use definitions from binary dir to test if installation will be correct def_dir="@CMAKE_BINARY_DIR@/@ECCODES_DEFINITION_SUFF@" @@ -24,3 +25,7 @@ fi samp_dir="@CMAKE_BINARY_DIR@/@ECCODES_SAMPLES_SUFF@" ECCODES_SAMPLES_PATH=${samp_dir} export ECCODES_SAMPLES_PATH + +if [ $HAVE_MEMFS -eq 1 ]; then + unset ECCODES_DEFINITION_PATH +fi diff --git a/examples/python/include.ctest.sh.in b/examples/python/include.ctest.sh.in index 3a7c0765c..5b651aece 100644 --- a/examples/python/include.ctest.sh.in +++ b/examples/python/include.ctest.sh.in @@ -3,6 +3,7 @@ set -eax data_dir=@PROJECT_BINARY_DIR@/data +HAVE_MEMFS=@HAVE_MEMFS@ # use definitions from binary dir to test if installation will be correct def_dir="@CMAKE_BINARY_DIR@/@ECCODES_DEFINITION_SUFF@" @@ -18,6 +19,10 @@ samp_dir="@CMAKE_BINARY_DIR@/@ECCODES_SAMPLES_SUFF@" ECCODES_SAMPLES_PATH=${samp_dir} export ECCODES_SAMPLES_PATH +if [ $HAVE_MEMFS -eq 1 ]; then + unset ECCODES_DEFINITION_PATH +fi + PYTHONPATH=@PROJECT_BINARY_DIR@/@ECCODES_PYTHON_DIR@:$PYTHONPATH export PYTHONPATH diff --git a/examples/python/metar_get_keys.sh b/examples/python/metar_get_keys.sh index 23a7e1ebe..b7833df06 100755 --- a/examples/python/metar_get_keys.sh +++ b/examples/python/metar_get_keys.sh @@ -9,7 +9,10 @@ # . ./include.sh - +if [ $HAVE_MEMFS -eq 1 ]; then + echo "$0: This test is currently disabled with MEMFS" + exit 0 +fi #Define a common label for all the tmp files label="metar_get_keys_test_p"