ctest with valgrind. Env var ECCODES_TEST_WITH_VALGRIND

This commit is contained in:
Shahram Najm 2016-12-30 14:28:43 +00:00
parent c57a42f26f
commit 45da446e2f
3 changed files with 20 additions and 0 deletions

View File

@ -18,6 +18,13 @@ export ECCODES_DEFINITION_PATH
tools_dir=@CMAKE_BINARY_DIR@/bin/
examples_dir=@CMAKE_CURRENT_BINARY_DIR@/
# If this environment variable is set, then run the
# executables with valgrind
if test "x$ECCODES_TEST_WITH_VALGRIND" != "x"; then
tools_dir="valgrind --error-exitcode=1 -q $tools_dir"
examples_dir="valgrind --error-exitcode=1 -q $examples_dir"
fi
# use samples from binary dir to test if installation will be correct
samp_dir="@CMAKE_BINARY_DIR@/share/@PROJECT_NAME@/samples"
ECCODES_SAMPLES_PATH=${samp_dir}

View File

@ -18,6 +18,13 @@ export ECCODES_DEFINITION_PATH
tools_dir=@CMAKE_BINARY_DIR@/bin/
examples_dir=@CMAKE_CURRENT_BINARY_DIR@/
# If this environment variable is set, then run the
# executables with valgrind
if test "x$ECCODES_TEST_WITH_VALGRIND" != "x"; then
tools_dir="valgrind --error-exitcode=1 -q $tools_dir"
examples_dir="valgrind --error-exitcode=1 -q $examples_dir"
fi
# use samples from binary dir to test if installation will be correct
samp_dir="@CMAKE_BINARY_DIR@/share/@PROJECT_NAME@/samples"
ECCODES_SAMPLES_PATH=${samp_dir}

View File

@ -20,6 +20,12 @@ export ECCODES_DEFINITION_PATH
tools_dir=@CMAKE_BINARY_DIR@/bin/
tigge_dir=@CMAKE_BINARY_DIR@/bin/
# If this environment variable is set, then run the
# executables with valgrind
if test "x$ECCODES_TEST_WITH_VALGRIND" != "x"; then
tools_dir="valgrind --error-exitcode=1 -q @CMAKE_BINARY_DIR@/bin/"
fi
# ecCodes tests are in the PROJECT_BINARY_DIR
test_dir=@PROJECT_BINARY_DIR@/tests/