2014-03-31 12:57:06 +00:00
|
|
|
set -ea
|
2022-03-25 21:30:04 +00:00
|
|
|
|
2022-04-03 22:02:48 +00:00
|
|
|
. ./utils.sh
|
|
|
|
|
2022-03-25 21:30:04 +00:00
|
|
|
# Not all Unix shells support this unfortunately
|
|
|
|
#set -o pipefail
|
2022-03-25 20:41:34 +00:00
|
|
|
|
2022-03-01 18:03:43 +00:00
|
|
|
# Unset any environment variable that could interfere with tests
|
|
|
|
unset ECCODES_EXTRA_DEFINITION_PATH
|
|
|
|
unset ECCODES_LOG_STREAM
|
|
|
|
unset ECCODES_FAIL_IF_LOG_MESSAGE
|
|
|
|
unset ECCODES_DEBUG
|
|
|
|
unset ECCODES_GRIB_WRITE_ON_FAIL
|
|
|
|
unset ECCODES_GRIB_DATA_QUALITY_CHECKS
|
|
|
|
unset ECCODES_GRIB_KEEP_MATRIX
|
|
|
|
unset ECCODES_GRIB_NO_SPD
|
|
|
|
unset ECCODES_GRIB_NO_BIG_GROUP_SPLIT
|
|
|
|
unset ECCODES_GRIB_IEEE_PACKING
|
|
|
|
unset ECCODES_GRIBEX_MODE_ON
|
|
|
|
unset ECCODES_BUFRDC_MODE_ON
|
|
|
|
unset ECCODES_BUFR_SET_TO_MISSING_IF_OUT_OF_RANGE
|
|
|
|
unset ECCODES_BUFR_MULTI_ELEMENT_CONSTANT_ARRAYS
|
|
|
|
unset ECCODES_FILE_POOL_MAX_OPENED_FILES
|
|
|
|
unset ECCODES_IO_BUFFER_SIZE
|
|
|
|
|
2018-08-15 11:00:07 +00:00
|
|
|
set -x
|
2020-07-19 14:18:57 +00:00
|
|
|
echo "Script: $0"
|
2015-01-26 17:08:10 +00:00
|
|
|
|
2014-03-31 12:57:06 +00:00
|
|
|
proj_dir=@PROJECT_SOURCE_DIR@
|
2018-11-06 16:26:54 +00:00
|
|
|
build_dir=@PROJECT_BINARY_DIR@
|
2014-03-31 12:57:06 +00:00
|
|
|
data_dir=@PROJECT_BINARY_DIR@/data
|
|
|
|
|
2015-03-10 18:19:51 +00:00
|
|
|
# use definitions from binary dir to test if installation will be correct
|
2017-02-03 14:13:35 +00:00
|
|
|
def_dir="@CMAKE_BINARY_DIR@/@ECCODES_DEFINITION_SUFF@"
|
2015-01-23 22:47:51 +00:00
|
|
|
ECCODES_DEFINITION_PATH="${def_dir}"
|
|
|
|
export ECCODES_DEFINITION_PATH
|
2014-03-31 12:57:06 +00:00
|
|
|
|
2015-03-10 18:19:51 +00:00
|
|
|
# binaries are in the TOP CMAKE_BINARY_DIR
|
2017-02-03 14:21:24 +00:00
|
|
|
tools_dir=@CMAKE_BINARY_DIR@/bin
|
2024-08-14 14:07:46 +00:00
|
|
|
bin_dir=@CMAKE_BINARY_DIR@/bin
|
2015-03-10 18:19:51 +00:00
|
|
|
|
2016-12-30 14:28:43 +00:00
|
|
|
# If this environment variable is set, then run the
|
2018-09-06 13:56:41 +00:00
|
|
|
# executables with valgrind. See ECC-746
|
|
|
|
EXEC=""
|
2016-12-30 14:28:43 +00:00
|
|
|
if test "x$ECCODES_TEST_WITH_VALGRIND" != "x"; then
|
2020-03-22 15:42:16 +00:00
|
|
|
EXEC="valgrind --error-exitcode=1 -q"
|
|
|
|
tools_dir="$EXEC @CMAKE_BINARY_DIR@/bin"
|
2016-12-30 14:28:43 +00:00
|
|
|
fi
|
|
|
|
|
2015-03-10 18:19:51 +00:00
|
|
|
# ecCodes tests are in the PROJECT_BINARY_DIR
|
2017-02-03 14:40:18 +00:00
|
|
|
test_dir=@PROJECT_BINARY_DIR@/tests
|
2014-03-31 12:57:06 +00:00
|
|
|
|
2015-03-10 18:19:51 +00:00
|
|
|
# use samples from binary dir to test if installation will be correct
|
2017-02-03 13:58:57 +00:00
|
|
|
samp_dir="@CMAKE_BINARY_DIR@/@ECCODES_SAMPLES_SUFF@"
|
2015-01-23 22:47:51 +00:00
|
|
|
ECCODES_SAMPLES_PATH=${samp_dir}
|
|
|
|
export ECCODES_SAMPLES_PATH
|
2016-08-05 15:24:14 +00:00
|
|
|
|
2022-05-02 16:10:48 +00:00
|
|
|
set -u
|
|
|
|
|
2016-08-05 15:24:14 +00:00
|
|
|
# Options
|
2020-03-30 15:17:36 +00:00
|
|
|
HAVE_PRODUCT_BUFR=@HAVE_PRODUCT_BUFR@
|
|
|
|
HAVE_PRODUCT_GRIB=@HAVE_PRODUCT_GRIB@
|
2016-12-22 19:28:24 +00:00
|
|
|
HAVE_JPEG=@HAVE_JPEG@
|
2018-02-02 11:54:06 +00:00
|
|
|
HAVE_LIBJASPER=@HAVE_LIBJASPER@
|
|
|
|
HAVE_LIBOPENJPEG=@HAVE_LIBOPENJPEG@
|
2016-08-05 15:24:14 +00:00
|
|
|
HAVE_PNG=@HAVE_PNG@
|
|
|
|
HAVE_AEC=@HAVE_AEC@
|
2024-07-12 08:51:12 +00:00
|
|
|
HAVE_GEOGRAPHY=@HAVE_GEOGRAPHY@
|
2018-07-19 13:31:28 +00:00
|
|
|
HAVE_EXTRA_TESTS=@HAVE_EXTRA_TESTS@
|
2018-08-22 17:44:57 +00:00
|
|
|
HAVE_MEMFS=@HAVE_MEMFS@
|
2019-12-12 11:08:31 +00:00
|
|
|
ECCODES_ON_WINDOWS=@ECCODES_ON_WINDOWS@
|
2018-04-06 12:53:07 +00:00
|
|
|
|
2018-05-08 13:16:44 +00:00
|
|
|
echo "Current directory: `pwd`"
|