From 712927ae4353180eef4f22e1f5d0823d5e2eadee Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Mon, 4 Apr 2022 13:35:10 +0100 Subject: [PATCH] Examples: remove autotools deprecated stuff --- examples/C/CMakeLists.txt | 1 - examples/C/bufr_attributes.sh | 2 +- examples/C/bufr_clone.sh | 2 +- examples/C/bufr_copy_data.sh | 2 +- examples/C/bufr_expanded.sh | 2 +- examples/C/bufr_get_keys.sh | 2 +- examples/C/bufr_get_string_array.sh | 2 +- examples/C/bufr_keys_iterator.sh | 2 +- examples/C/bufr_missing.sh | 2 +- examples/C/bufr_pthreads.sh | 2 +- examples/C/bufr_read_header.sh | 2 +- examples/C/bufr_read_scatterometer.sh | 2 +- examples/C/bufr_read_synop.sh | 2 +- examples/C/bufr_read_temp.sh | 2 +- examples/C/bufr_read_tempf.sh | 2 +- examples/C/bufr_set_keys.sh | 2 +- examples/C/bufr_subset.sh | 2 +- examples/C/get_product_kind.sh | 2 +- examples/C/get_product_kind_samples.sh | 2 +- examples/C/grib_clone.sh | 2 +- examples/C/grib_copy_message.sh | 2 +- examples/C/grib_ensemble_index.sh | 2 +- examples/C/grib_get_data.sh | 2 +- examples/C/grib_get_keys.sh | 2 +- examples/C/grib_iterator.sh | 2 +- examples/C/grib_keys_iterator.sh | 2 +- examples/C/grib_list.sh | 2 +- examples/C/grib_multi.sh | 2 +- examples/C/grib_multi_write.sh | 2 +- examples/C/grib_nearest.sh | 2 +- examples/C/grib_nearest_multiple.sh | 2 +- examples/C/grib_precision.sh | 2 +- examples/C/grib_print_data.sh | 2 +- examples/C/grib_pthreads.sh | 2 +- examples/C/grib_sections_copy.sh | 2 +- examples/C/grib_set_bitmap.sh | 2 +- examples/C/grib_set_data.sh | 2 +- examples/C/grib_set_keys.sh | 2 +- examples/C/grib_set_missing.sh | 2 +- examples/C/grib_set_pv.sh | 2 +- examples/C/grib_values_check.sh | 2 +- examples/C/include.ctest.sh.in | 19 +++++++ examples/C/include.sh | 61 ---------------------- examples/C/large_grib1.sh | 2 +- examples/F90/CMakeLists.txt | 1 - examples/F90/bufr_attributes.sh | 2 +- examples/F90/bufr_clone.sh | 2 +- examples/F90/bufr_copy_data.sh | 2 +- examples/F90/bufr_copy_keys.sh | 2 +- examples/F90/bufr_copy_message.sh | 2 +- examples/F90/bufr_ecc-1284.sh | 2 +- examples/F90/bufr_expanded.sh | 2 +- examples/F90/bufr_get_keys.sh | 2 +- examples/F90/bufr_get_string_array.sh | 2 +- examples/F90/bufr_keys_iterator.sh | 2 +- examples/F90/bufr_read_header.sh | 2 +- examples/F90/bufr_read_scatterometer.sh | 2 +- examples/F90/bufr_read_synop.sh | 2 +- examples/F90/bufr_read_temp.sh | 2 +- examples/F90/bufr_read_tempf.sh | 2 +- examples/F90/bufr_read_tropical_cyclone.sh | 2 +- examples/F90/bufr_set_keys.sh | 2 +- examples/F90/bufr_subset.sh | 2 +- examples/F90/get_product_kind.sh | 2 +- examples/F90/grib_clone.sh | 2 +- examples/F90/grib_copy_message.sh | 2 +- examples/F90/grib_copy_namespace.sh | 2 +- examples/F90/grib_count_messages.sh | 2 +- examples/F90/grib_count_messages_multi.sh | 2 +- examples/F90/grib_ecc-1316.sh | 2 +- examples/F90/grib_ecc-671.sh | 2 +- examples/F90/grib_get_data.sh | 2 +- examples/F90/grib_get_keys.sh | 2 +- examples/F90/grib_get_pl.sh | 2 +- examples/F90/grib_get_pv.sh | 2 +- examples/F90/grib_get_set_uuid.sh | 2 +- examples/F90/grib_index.sh | 2 +- examples/F90/grib_keys_iterator.sh | 2 +- examples/F90/grib_multi.sh | 2 +- examples/F90/grib_multi_write.sh | 2 +- examples/F90/grib_nearest.sh | 2 +- examples/F90/grib_precision.sh | 2 +- examples/F90/grib_print_data.sh | 2 +- examples/F90/grib_read_from_file.sh | 2 +- examples/F90/grib_read_message.sh | 2 +- examples/F90/grib_samples.sh | 2 +- examples/F90/grib_set_bitmap.sh | 2 +- examples/F90/grib_set_data.sh | 2 +- examples/F90/grib_set_keys.sh | 2 +- examples/F90/grib_set_missing.sh | 2 +- examples/F90/grib_set_packing.sh | 2 +- examples/F90/grib_set_pv.sh | 2 +- examples/F90/include.ctest.sh.in | 18 +++++++ tests/grib_compare.sh | 2 +- 94 files changed, 126 insertions(+), 152 deletions(-) delete mode 100644 examples/C/include.sh diff --git a/examples/C/CMakeLists.txt b/examples/C/CMakeLists.txt index b16e717e6..bafdb2dfc 100644 --- a/examples/C/CMakeLists.txt +++ b/examples/C/CMakeLists.txt @@ -3,7 +3,6 @@ # Configure the file which all CMake tests will include configure_file( include.ctest.sh.in include.ctest.sh @ONLY ) -execute_process( COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/include.sh ${CMAKE_CURRENT_BINARY_DIR} ) # Build the executables used by test scripts ############################################# diff --git a/examples/C/bufr_attributes.sh b/examples/C/bufr_attributes.sh index e8a2e792b..a35033b60 100755 --- a/examples/C/bufr_attributes.sh +++ b/examples/C/bufr_attributes.sh @@ -8,7 +8,7 @@ # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. # -. ./include.sh +. ./include.ctest.sh #Define a common label for all the tmp files diff --git a/examples/C/bufr_clone.sh b/examples/C/bufr_clone.sh index 2e2bf3cba..96a5c7eaa 100755 --- a/examples/C/bufr_clone.sh +++ b/examples/C/bufr_clone.sh @@ -7,7 +7,7 @@ # In applying this licence, ECMWF does not waive the privileges and immunities granted to it by # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. -. ./include.sh +. ./include.ctest.sh # Define a common label for all the tmp files label="bufr_clone_test_c" diff --git a/examples/C/bufr_copy_data.sh b/examples/C/bufr_copy_data.sh index 7321f7463..1fa49a4fe 100755 --- a/examples/C/bufr_copy_data.sh +++ b/examples/C/bufr_copy_data.sh @@ -7,7 +7,7 @@ # In applying this licence, ECMWF does not waive the privileges and immunities granted to it by # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. -. ./include.sh +. ./include.ctest.sh #Define a common label for all the tmp files label="bufr_copy_data_c" diff --git a/examples/C/bufr_expanded.sh b/examples/C/bufr_expanded.sh index 6c9b6f947..bfedf30f2 100755 --- a/examples/C/bufr_expanded.sh +++ b/examples/C/bufr_expanded.sh @@ -7,7 +7,7 @@ # In applying this licence, ECMWF does not waive the privileges and immunities granted to it by # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. -. ./include.sh +. ./include.ctest.sh #Define a common label for all the tmp files label="bufr_expanded_test_c" diff --git a/examples/C/bufr_get_keys.sh b/examples/C/bufr_get_keys.sh index cb6301550..677397381 100755 --- a/examples/C/bufr_get_keys.sh +++ b/examples/C/bufr_get_keys.sh @@ -8,7 +8,7 @@ # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. # -. ./include.sh +. ./include.ctest.sh #Define a common label for all the tmp files diff --git a/examples/C/bufr_get_string_array.sh b/examples/C/bufr_get_string_array.sh index 70ca1989a..1fbed170b 100755 --- a/examples/C/bufr_get_string_array.sh +++ b/examples/C/bufr_get_string_array.sh @@ -8,7 +8,7 @@ # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. # -. ./include.sh +. ./include.ctest.sh # Define a common label for all the tmp files label="bufr_get_string_array_test_c" diff --git a/examples/C/bufr_keys_iterator.sh b/examples/C/bufr_keys_iterator.sh index a01ec87e6..ba73558bd 100755 --- a/examples/C/bufr_keys_iterator.sh +++ b/examples/C/bufr_keys_iterator.sh @@ -9,7 +9,7 @@ # set -x -. ./include.sh +. ./include.ctest.sh # Define a common label for all the tmp files diff --git a/examples/C/bufr_missing.sh b/examples/C/bufr_missing.sh index 073415e09..0a0c70a51 100755 --- a/examples/C/bufr_missing.sh +++ b/examples/C/bufr_missing.sh @@ -8,7 +8,7 @@ # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. # -. ./include.sh +. ./include.ctest.sh #Define a common label for all the tmp files diff --git a/examples/C/bufr_pthreads.sh b/examples/C/bufr_pthreads.sh index 150b457ea..c54fa777e 100755 --- a/examples/C/bufr_pthreads.sh +++ b/examples/C/bufr_pthreads.sh @@ -7,7 +7,7 @@ # In applying this licence, ECMWF does not waive the privileges and immunities granted to it by # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. -. ./include.sh +. ./include.ctest.sh for i in `seq 0 100`; do echo iteration $i diff --git a/examples/C/bufr_read_header.sh b/examples/C/bufr_read_header.sh index f7ce7c502..37087aa33 100755 --- a/examples/C/bufr_read_header.sh +++ b/examples/C/bufr_read_header.sh @@ -8,7 +8,7 @@ # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. # -. ./include.sh +. ./include.ctest.sh #Define a common label for all the tmp files label="bufr_read_header_test_c" diff --git a/examples/C/bufr_read_scatterometer.sh b/examples/C/bufr_read_scatterometer.sh index b3bc6d4ca..197e9e6fd 100755 --- a/examples/C/bufr_read_scatterometer.sh +++ b/examples/C/bufr_read_scatterometer.sh @@ -8,7 +8,7 @@ # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. # -. ./include.sh +. ./include.ctest.sh # Define a common label for all the tmp files diff --git a/examples/C/bufr_read_synop.sh b/examples/C/bufr_read_synop.sh index 68cf264d7..c56cab752 100755 --- a/examples/C/bufr_read_synop.sh +++ b/examples/C/bufr_read_synop.sh @@ -8,7 +8,7 @@ # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. # -. ./include.sh +. ./include.ctest.sh #Define a common label for all the tmp files diff --git a/examples/C/bufr_read_temp.sh b/examples/C/bufr_read_temp.sh index 77c70fd37..9640ae3de 100755 --- a/examples/C/bufr_read_temp.sh +++ b/examples/C/bufr_read_temp.sh @@ -8,7 +8,7 @@ # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. # -. ./include.sh +. ./include.ctest.sh #Define a common label for all the tmp files diff --git a/examples/C/bufr_read_tempf.sh b/examples/C/bufr_read_tempf.sh index bf2049853..cc4131e7f 100755 --- a/examples/C/bufr_read_tempf.sh +++ b/examples/C/bufr_read_tempf.sh @@ -8,7 +8,7 @@ # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. # -. ./include.sh +. ./include.ctest.sh #Define a common label for all the tmp files diff --git a/examples/C/bufr_set_keys.sh b/examples/C/bufr_set_keys.sh index 22da5eeb9..96fd48416 100755 --- a/examples/C/bufr_set_keys.sh +++ b/examples/C/bufr_set_keys.sh @@ -8,7 +8,7 @@ # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. # -. ./include.sh +. ./include.ctest.sh #Define a common label for all the tmp files diff --git a/examples/C/bufr_subset.sh b/examples/C/bufr_subset.sh index 334aff8ca..c42890296 100755 --- a/examples/C/bufr_subset.sh +++ b/examples/C/bufr_subset.sh @@ -8,7 +8,7 @@ # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. # -. ./include.sh +. ./include.ctest.sh #Define a common label for all the tmp files label="bufr_subset_test_c" diff --git a/examples/C/get_product_kind.sh b/examples/C/get_product_kind.sh index b0acae9c5..cd6ff1c5b 100755 --- a/examples/C/get_product_kind.sh +++ b/examples/C/get_product_kind.sh @@ -8,7 +8,7 @@ # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. # -. ./include.sh +. ./include.ctest.sh label="get_product_kind_c" fTmp=${label}.tmp diff --git a/examples/C/get_product_kind_samples.sh b/examples/C/get_product_kind_samples.sh index 2622d09e5..7aaecb8c7 100755 --- a/examples/C/get_product_kind_samples.sh +++ b/examples/C/get_product_kind_samples.sh @@ -8,7 +8,7 @@ # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. # -. ./include.sh +. ./include.ctest.sh label="get_product_kind_samples_c" fTmp=${label}.tmp diff --git a/examples/C/grib_clone.sh b/examples/C/grib_clone.sh index e367cff30..8b9025879 100755 --- a/examples/C/grib_clone.sh +++ b/examples/C/grib_clone.sh @@ -7,7 +7,7 @@ # In applying this licence, ECMWF does not waive the privileges and immunities granted to it by # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. -. ./include.sh +. ./include.ctest.sh TEMP=cloned.grib diff --git a/examples/C/grib_copy_message.sh b/examples/C/grib_copy_message.sh index 58fa3ef9c..a5be3abf3 100755 --- a/examples/C/grib_copy_message.sh +++ b/examples/C/grib_copy_message.sh @@ -7,7 +7,7 @@ # In applying this licence, ECMWF does not waive the privileges and immunities granted to it by # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. -. ./include.sh +. ./include.ctest.sh TEMP=c_grib_copy_message.grib diff --git a/examples/C/grib_ensemble_index.sh b/examples/C/grib_ensemble_index.sh index 307738e63..0d4b7934e 100755 --- a/examples/C/grib_ensemble_index.sh +++ b/examples/C/grib_ensemble_index.sh @@ -7,7 +7,7 @@ # In applying this licence, ECMWF does not waive the privileges and immunities granted to it by # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. -. ./include.sh +. ./include.ctest.sh input="../../data/index.grib" ${examples_dir}/c_grib_ensemble_index $input diff --git a/examples/C/grib_get_data.sh b/examples/C/grib_get_data.sh index 106c21c1e..aaf25e909 100755 --- a/examples/C/grib_get_data.sh +++ b/examples/C/grib_get_data.sh @@ -7,6 +7,6 @@ # In applying this licence, ECMWF does not waive the privileges and immunities granted to it by # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. -. ./include.sh +. ./include.ctest.sh ${examples_dir}/c_grib_get_data > /dev/null diff --git a/examples/C/grib_get_keys.sh b/examples/C/grib_get_keys.sh index ef2e9913f..6132437a1 100755 --- a/examples/C/grib_get_keys.sh +++ b/examples/C/grib_get_keys.sh @@ -7,7 +7,7 @@ # In applying this licence, ECMWF does not waive the privileges and immunities granted to it by # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. -. ./include.sh +. ./include.ctest.sh ${examples_dir}/c_grib_get_keys diff --git a/examples/C/grib_iterator.sh b/examples/C/grib_iterator.sh index 76bce1e1a..e54d9104d 100755 --- a/examples/C/grib_iterator.sh +++ b/examples/C/grib_iterator.sh @@ -7,7 +7,7 @@ # In applying this licence, ECMWF does not waive the privileges and immunities granted to it by # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. -. ./include.sh +. ./include.ctest.sh temp=temp.c_grib_iterator.txt # These two do not have any missing data diff --git a/examples/C/grib_keys_iterator.sh b/examples/C/grib_keys_iterator.sh index 0d2edb2ce..e2b0b7e58 100755 --- a/examples/C/grib_keys_iterator.sh +++ b/examples/C/grib_keys_iterator.sh @@ -7,7 +7,7 @@ # In applying this licence, ECMWF does not waive the privileges and immunities granted to it by # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. -. ./include.sh +. ./include.ctest.sh ${examples_dir}/c_grib_keys_iterator ${data_dir}/reduced_latlon_surface.grib1 > /dev/null diff --git a/examples/C/grib_list.sh b/examples/C/grib_list.sh index 576c4ac66..7d11b01ce 100755 --- a/examples/C/grib_list.sh +++ b/examples/C/grib_list.sh @@ -7,7 +7,7 @@ # In applying this licence, ECMWF does not waive the privileges and immunities granted to it by # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. -. ./include.sh +. ./include.ctest.sh ${examples_dir}/c_grib_list diff --git a/examples/C/grib_multi.sh b/examples/C/grib_multi.sh index af58b1cdd..d6add3a98 100755 --- a/examples/C/grib_multi.sh +++ b/examples/C/grib_multi.sh @@ -7,7 +7,7 @@ # In applying this licence, ECMWF does not waive the privileges and immunities granted to it by # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. -. ./include.sh +. ./include.ctest.sh # Test decoding multi-field GRIB2 data ${examples_dir}/c_grib_multi diff --git a/examples/C/grib_multi_write.sh b/examples/C/grib_multi_write.sh index 247e8a6bf..a6a621a59 100755 --- a/examples/C/grib_multi_write.sh +++ b/examples/C/grib_multi_write.sh @@ -7,7 +7,7 @@ # In applying this licence, ECMWF does not waive the privileges and immunities granted to it by # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. -. ./include.sh +. ./include.ctest.sh #if [ ! -f "${data_dir}/sample.grib2" ] #then diff --git a/examples/C/grib_nearest.sh b/examples/C/grib_nearest.sh index 20510ebb0..cd0bc8324 100755 --- a/examples/C/grib_nearest.sh +++ b/examples/C/grib_nearest.sh @@ -8,7 +8,7 @@ # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. # -. ./include.sh +. ./include.ctest.sh set -u label="grib_nearest_c" diff --git a/examples/C/grib_nearest_multiple.sh b/examples/C/grib_nearest_multiple.sh index baef18574..d203cfe06 100755 --- a/examples/C/grib_nearest_multiple.sh +++ b/examples/C/grib_nearest_multiple.sh @@ -8,7 +8,7 @@ # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. # -. ./include.sh +. ./include.ctest.sh label="grib_nearest_multiple" temp1=$label.temp1.$$ diff --git a/examples/C/grib_precision.sh b/examples/C/grib_precision.sh index 8e5bef899..2325c74f3 100755 --- a/examples/C/grib_precision.sh +++ b/examples/C/grib_precision.sh @@ -7,7 +7,7 @@ # In applying this licence, ECMWF does not waive the privileges and immunities granted to it by # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. -. ./include.sh +. ./include.ctest.sh ${examples_dir}/c_grib_precision diff --git a/examples/C/grib_print_data.sh b/examples/C/grib_print_data.sh index a54e5e797..2d11bf34e 100755 --- a/examples/C/grib_print_data.sh +++ b/examples/C/grib_print_data.sh @@ -7,7 +7,7 @@ # In applying this licence, ECMWF does not waive the privileges and immunities granted to it by # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. -. ./include.sh +. ./include.ctest.sh ${examples_dir}/c_grib_print_data ../../data/constant_field.grib1 >/dev/null diff --git a/examples/C/grib_pthreads.sh b/examples/C/grib_pthreads.sh index f2e2d636d..948339ec2 100755 --- a/examples/C/grib_pthreads.sh +++ b/examples/C/grib_pthreads.sh @@ -7,7 +7,7 @@ # In applying this licence, ECMWF does not waive the privileges and immunities granted to it by # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. -. ./include.sh +. ./include.ctest.sh for i in `seq 0 100`; do ${examples_dir}/c_grib_pthreads diff --git a/examples/C/grib_sections_copy.sh b/examples/C/grib_sections_copy.sh index 5bc00810d..13cdf6a69 100755 --- a/examples/C/grib_sections_copy.sh +++ b/examples/C/grib_sections_copy.sh @@ -7,7 +7,7 @@ # In applying this licence, ECMWF does not waive the privileges and immunities granted to it by # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. -. ./include.sh +. ./include.ctest.sh REGUL_GRID_FILE=${proj_dir}/samples/regular_ll_sfc_grib2.tmpl GAUSS_GRID_FILE=${proj_dir}/samples/reduced_gg_pl_640_grib2.tmpl diff --git a/examples/C/grib_set_bitmap.sh b/examples/C/grib_set_bitmap.sh index c2b4e85ca..79deb3ef9 100755 --- a/examples/C/grib_set_bitmap.sh +++ b/examples/C/grib_set_bitmap.sh @@ -7,7 +7,7 @@ # In applying this licence, ECMWF does not waive the privileges and immunities granted to it by # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. -. ./include.sh +. ./include.ctest.sh OUT_TMP=out.set_bitmap_c.grib diff --git a/examples/C/grib_set_data.sh b/examples/C/grib_set_data.sh index c68e99e6a..826f628c7 100755 --- a/examples/C/grib_set_data.sh +++ b/examples/C/grib_set_data.sh @@ -7,7 +7,7 @@ # In applying this licence, ECMWF does not waive the privileges and immunities granted to it by # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. -. ./include.sh +. ./include.ctest.sh OUT=temp.c_grib_set_data.out.grib diff --git a/examples/C/grib_set_keys.sh b/examples/C/grib_set_keys.sh index 65a7581c0..38a623e67 100755 --- a/examples/C/grib_set_keys.sh +++ b/examples/C/grib_set_keys.sh @@ -7,7 +7,7 @@ # In applying this licence, ECMWF does not waive the privileges and immunities granted to it by # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. -. ./include.sh +. ./include.ctest.sh ${examples_dir}/c_grib_set_keys diff --git a/examples/C/grib_set_missing.sh b/examples/C/grib_set_missing.sh index 847d634e2..1be3f5a8f 100755 --- a/examples/C/grib_set_missing.sh +++ b/examples/C/grib_set_missing.sh @@ -7,7 +7,7 @@ # In applying this licence, ECMWF does not waive the privileges and immunities granted to it by # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. -. ./include.sh +. ./include.ctest.sh tempGrib="out_surface_level.grib2" diff --git a/examples/C/grib_set_pv.sh b/examples/C/grib_set_pv.sh index 04604aedb..6d201316d 100755 --- a/examples/C/grib_set_pv.sh +++ b/examples/C/grib_set_pv.sh @@ -7,7 +7,7 @@ # In applying this licence, ECMWF does not waive the privileges and immunities granted to it by # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. -. ./include.sh +. ./include.ctest.sh GRIB1=${data_dir}/regular_latlon_surface.grib1 GRIB2=${proj_dir}/samples/regular_ll_sfc_grib2.tmpl diff --git a/examples/C/grib_values_check.sh b/examples/C/grib_values_check.sh index b8bc9fcbe..7ac41b52d 100755 --- a/examples/C/grib_values_check.sh +++ b/examples/C/grib_values_check.sh @@ -8,7 +8,7 @@ # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. # -. ./include.sh +. ./include.ctest.sh #Define a common label for all the tmp files label="grib_values_check_c" diff --git a/examples/C/include.ctest.sh.in b/examples/C/include.ctest.sh.in index 854e025f0..e861370cc 100644 --- a/examples/C/include.ctest.sh.in +++ b/examples/C/include.ctest.sh.in @@ -3,6 +3,25 @@ set -eax echo "Script: $0" +# 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 + + proj_dir=@PROJECT_SOURCE_DIR@ data_dir=@PROJECT_BINARY_DIR@/data HAVE_PRODUCT_BUFR=@HAVE_PRODUCT_BUFR@ diff --git a/examples/C/include.sh b/examples/C/include.sh deleted file mode 100644 index 2332e2a42..000000000 --- a/examples/C/include.sh +++ /dev/null @@ -1,61 +0,0 @@ -set -ea -# (C) Copyright 2005- ECMWF. -# -# This software is licensed under the terms of the Apache Licence Version 2.0 -# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. -# -# In applying this licence, ECMWF does not waive the privileges and immunities granted to it by -# virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. - -CMAKE_INCLUDE_FILE=include.ctest.sh -if [ -f "$CMAKE_INCLUDE_FILE" ]; then - # This is the config file for Cmake tests - . ./$CMAKE_INCLUDE_FILE - -else - # This is for autotools - echo - echo "TEST: $0" - set -x - - if [ -z "${data_dir}" ] - then - cd ../../ - cpath=`pwd` - proj_dir=$cpath - ECCODES_DEFINITION_PATH=$cpath/definitions - export ECCODES_DEFINITION_PATH - ECCODES_SAMPLES_PATH=$cpath/samples - export ECCODES_SAMPLES_PATH - tools_dir=$cpath/tools - examples_dir=$cpath/examples/C - - if test "x$ECCODES_TEST_WITH_VALGRIND" != "x"; then - tools_dir="valgrind --error-exitcode=1 -q $cpath/tools" - examples_dir="valgrind --error-exitcode=1 -q $cpath/examples/C" - fi - - data_dir=$cpath/data - else - echo "Skipping test $0" - exit - fi - - cd "$cpath/examples/C" - - if [ -z "${GRIB_API_INCLUDE}" ] - then - GRIB_API_INCLUDE=`pwd`/src - fi - - if [ -z "${GRIB_API_LIB}" ] - then - GRIB_API_LIB=`pwd`/src - fi - - # Download the data needed for tests - ${data_dir}/download.sh "${data_dir}" - - #${tools_dir}/codes_info - set -u -fi diff --git a/examples/C/large_grib1.sh b/examples/C/large_grib1.sh index 03fa1943b..700d354e3 100755 --- a/examples/C/large_grib1.sh +++ b/examples/C/large_grib1.sh @@ -7,7 +7,7 @@ # In applying this licence, ECMWF does not waive the privileges and immunities granted to it by # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. -. ./include.sh +. ./include.ctest.sh # The executable should produce a GRIB1 file ${examples_dir}/c_large_grib1 diff --git a/examples/F90/CMakeLists.txt b/examples/F90/CMakeLists.txt index 7119d771a..2bd03253d 100644 --- a/examples/F90/CMakeLists.txt +++ b/examples/F90/CMakeLists.txt @@ -3,7 +3,6 @@ # Configure the file which all CMake tests will include configure_file( include.ctest.sh.in include.ctest.sh @ONLY ) -execute_process( COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/include.sh ${CMAKE_CURRENT_BINARY_DIR} ) # Add all the tests #################### diff --git a/examples/F90/bufr_attributes.sh b/examples/F90/bufr_attributes.sh index 684a08b82..12418e86a 100755 --- a/examples/F90/bufr_attributes.sh +++ b/examples/F90/bufr_attributes.sh @@ -8,7 +8,7 @@ # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. # -. ./include.sh +. ./include.ctest.sh #Define a common label for all the tmp files diff --git a/examples/F90/bufr_clone.sh b/examples/F90/bufr_clone.sh index b783cd71f..f22cd64d2 100755 --- a/examples/F90/bufr_clone.sh +++ b/examples/F90/bufr_clone.sh @@ -7,7 +7,7 @@ # In applying this licence, ECMWF does not waive the privileges and immunities granted to it by # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. -. ./include.sh +. ./include.ctest.sh #Define a common label for all the tmp files label="bufr_clone_test_f" diff --git a/examples/F90/bufr_copy_data.sh b/examples/F90/bufr_copy_data.sh index a55f2a71b..c79c62a3f 100755 --- a/examples/F90/bufr_copy_data.sh +++ b/examples/F90/bufr_copy_data.sh @@ -7,7 +7,7 @@ # In applying this licence, ECMWF does not waive the privileges and immunities granted to it by # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. -. ./include.sh +. ./include.ctest.sh #Define a common label for all the tmp files label="bufr_copy_data_f" diff --git a/examples/F90/bufr_copy_keys.sh b/examples/F90/bufr_copy_keys.sh index 5f5fa6d3b..6aa8cb8a7 100755 --- a/examples/F90/bufr_copy_keys.sh +++ b/examples/F90/bufr_copy_keys.sh @@ -7,7 +7,7 @@ # In applying this licence, ECMWF does not waive the privileges and immunities granted to it by # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. -. ./include.sh +. ./include.ctest.sh #Define a common label for all the tmp files label="bufr_copy_keys_test_f" diff --git a/examples/F90/bufr_copy_message.sh b/examples/F90/bufr_copy_message.sh index 226a89119..8c97af276 100755 --- a/examples/F90/bufr_copy_message.sh +++ b/examples/F90/bufr_copy_message.sh @@ -7,7 +7,7 @@ # In applying this licence, ECMWF does not waive the privileges and immunities granted to it by # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. -. ./include.sh +. ./include.ctest.sh INPUT="../../data/bufr/syno_1.bufr" OUTPUT=out.copy.bufr diff --git a/examples/F90/bufr_ecc-1284.sh b/examples/F90/bufr_ecc-1284.sh index 56b635717..50ee66dff 100755 --- a/examples/F90/bufr_ecc-1284.sh +++ b/examples/F90/bufr_ecc-1284.sh @@ -8,7 +8,7 @@ # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. # -. ./include.sh +. ./include.ctest.sh set -u label="bufr_ecc-1284_test_f" diff --git a/examples/F90/bufr_expanded.sh b/examples/F90/bufr_expanded.sh index 48c6fc351..79d1f3018 100755 --- a/examples/F90/bufr_expanded.sh +++ b/examples/F90/bufr_expanded.sh @@ -7,7 +7,7 @@ # In applying this licence, ECMWF does not waive the privileges and immunities granted to it by # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. -. ./include.sh +. ./include.ctest.sh #Define a common label for all the tmp files label="bufr_expanded_test_f" diff --git a/examples/F90/bufr_get_keys.sh b/examples/F90/bufr_get_keys.sh index 6cc34839d..943ae1411 100755 --- a/examples/F90/bufr_get_keys.sh +++ b/examples/F90/bufr_get_keys.sh @@ -8,7 +8,7 @@ # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. # -. ./include.sh +. ./include.ctest.sh #Define a common label for all the tmp files diff --git a/examples/F90/bufr_get_string_array.sh b/examples/F90/bufr_get_string_array.sh index d94c72b41..edfd86d20 100755 --- a/examples/F90/bufr_get_string_array.sh +++ b/examples/F90/bufr_get_string_array.sh @@ -7,7 +7,7 @@ # In applying this licence, ECMWF does not waive the privileges and immunities granted to it by # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. -. ./include.sh +. ./include.ctest.sh #Define a common label for all the tmp files label="bufr_get_string_array_test_f" diff --git a/examples/F90/bufr_keys_iterator.sh b/examples/F90/bufr_keys_iterator.sh index cc2e768a2..ee9d27ca0 100755 --- a/examples/F90/bufr_keys_iterator.sh +++ b/examples/F90/bufr_keys_iterator.sh @@ -8,7 +8,7 @@ # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. # -. ./include.sh +. ./include.ctest.sh #Define a common label for all the tmp files label="bufr_keys_iterator_test_f" diff --git a/examples/F90/bufr_read_header.sh b/examples/F90/bufr_read_header.sh index 3d224c9e9..cb060d2b3 100755 --- a/examples/F90/bufr_read_header.sh +++ b/examples/F90/bufr_read_header.sh @@ -7,7 +7,7 @@ # In applying this licence, ECMWF does not waive the privileges and immunities granted to it by # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. -. ./include.sh +. ./include.ctest.sh # Define a common label for all the tmp files label="bufr_read_header_test_f" diff --git a/examples/F90/bufr_read_scatterometer.sh b/examples/F90/bufr_read_scatterometer.sh index db2871134..8c80ac2b4 100755 --- a/examples/F90/bufr_read_scatterometer.sh +++ b/examples/F90/bufr_read_scatterometer.sh @@ -8,7 +8,7 @@ # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. # -. ./include.sh +. ./include.ctest.sh # Define a common label for all the tmp files diff --git a/examples/F90/bufr_read_synop.sh b/examples/F90/bufr_read_synop.sh index d1f424df6..26028306f 100755 --- a/examples/F90/bufr_read_synop.sh +++ b/examples/F90/bufr_read_synop.sh @@ -8,7 +8,7 @@ # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. # -. ./include.sh +. ./include.ctest.sh #Define a common label for all the tmp files diff --git a/examples/F90/bufr_read_temp.sh b/examples/F90/bufr_read_temp.sh index 26cc70b4a..bc9184197 100755 --- a/examples/F90/bufr_read_temp.sh +++ b/examples/F90/bufr_read_temp.sh @@ -8,7 +8,7 @@ # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. # -. ./include.sh +. ./include.ctest.sh #Define a common label for all the tmp files diff --git a/examples/F90/bufr_read_tempf.sh b/examples/F90/bufr_read_tempf.sh index 1bc12ec9c..295a7f1ca 100755 --- a/examples/F90/bufr_read_tempf.sh +++ b/examples/F90/bufr_read_tempf.sh @@ -8,7 +8,7 @@ # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. # -. ./include.sh +. ./include.ctest.sh # Define a common label for all the tmp files label="bufr_read_tempf_f" diff --git a/examples/F90/bufr_read_tropical_cyclone.sh b/examples/F90/bufr_read_tropical_cyclone.sh index 03eda00e0..430699bbd 100755 --- a/examples/F90/bufr_read_tropical_cyclone.sh +++ b/examples/F90/bufr_read_tropical_cyclone.sh @@ -8,7 +8,7 @@ # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. # -. ./include.sh +. ./include.ctest.sh #Define a common label for all the tmp files diff --git a/examples/F90/bufr_set_keys.sh b/examples/F90/bufr_set_keys.sh index 5f32bb6b8..200891b3c 100755 --- a/examples/F90/bufr_set_keys.sh +++ b/examples/F90/bufr_set_keys.sh @@ -7,7 +7,7 @@ # In applying this licence, ECMWF does not waive the privileges and immunities granted to it by # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. -. ./include.sh +. ./include.ctest.sh #Define a common label for all the tmp files label="bufr_set_keys_test_f" diff --git a/examples/F90/bufr_subset.sh b/examples/F90/bufr_subset.sh index 8b70ac75a..3c2571444 100755 --- a/examples/F90/bufr_subset.sh +++ b/examples/F90/bufr_subset.sh @@ -8,7 +8,7 @@ # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. # -. ./include.sh +. ./include.ctest.sh #Define a common label for all the tmp files label="bufr_subset_test_f" diff --git a/examples/F90/get_product_kind.sh b/examples/F90/get_product_kind.sh index 734e15e75..e3fcee957 100755 --- a/examples/F90/get_product_kind.sh +++ b/examples/F90/get_product_kind.sh @@ -8,7 +8,7 @@ # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. # -. ./include.sh +. ./include.ctest.sh label="get_product_kind_f" fTmp=${label}.tmp diff --git a/examples/F90/grib_clone.sh b/examples/F90/grib_clone.sh index 5faaa86e1..52e3eed31 100755 --- a/examples/F90/grib_clone.sh +++ b/examples/F90/grib_clone.sh @@ -7,7 +7,7 @@ # In applying this licence, ECMWF does not waive the privileges and immunities granted to it by # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. -. ./include.sh +. ./include.ctest.sh ${examples_dir}/eccodes_f_grib_clone > /dev/null rm -f out.clone.grib1 diff --git a/examples/F90/grib_copy_message.sh b/examples/F90/grib_copy_message.sh index dec0cd93b..df6dead71 100755 --- a/examples/F90/grib_copy_message.sh +++ b/examples/F90/grib_copy_message.sh @@ -7,7 +7,7 @@ # In applying this licence, ECMWF does not waive the privileges and immunities granted to it by # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. -. ./include.sh +. ./include.ctest.sh INPUT="../../data/constant_field.grib1" OUTPUT=out.copy.grib1 diff --git a/examples/F90/grib_copy_namespace.sh b/examples/F90/grib_copy_namespace.sh index 53680f4dc..715e34e34 100755 --- a/examples/F90/grib_copy_namespace.sh +++ b/examples/F90/grib_copy_namespace.sh @@ -7,7 +7,7 @@ # In applying this licence, ECMWF does not waive the privileges and immunities granted to it by # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. -. ./include.sh +. ./include.ctest.sh #Define a common label for all the tmp files label="grib_copy_namespace_test_f" diff --git a/examples/F90/grib_count_messages.sh b/examples/F90/grib_count_messages.sh index 196a88fe9..d2ff423be 100755 --- a/examples/F90/grib_count_messages.sh +++ b/examples/F90/grib_count_messages.sh @@ -7,6 +7,6 @@ # In applying this licence, ECMWF does not waive the privileges and immunities granted to it by # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. -. ./include.sh +. ./include.ctest.sh ${examples_dir}/eccodes_f_grib_count_messages > /dev/null diff --git a/examples/F90/grib_count_messages_multi.sh b/examples/F90/grib_count_messages_multi.sh index ac63751a6..f639f16f4 100755 --- a/examples/F90/grib_count_messages_multi.sh +++ b/examples/F90/grib_count_messages_multi.sh @@ -7,7 +7,7 @@ # In applying this licence, ECMWF does not waive the privileges and immunities granted to it by # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. -. ./include.sh +. ./include.ctest.sh INPUT="../../data/multi.grib2" diff --git a/examples/F90/grib_ecc-1316.sh b/examples/F90/grib_ecc-1316.sh index a8c3b3fdf..8035ea384 100755 --- a/examples/F90/grib_ecc-1316.sh +++ b/examples/F90/grib_ecc-1316.sh @@ -8,6 +8,6 @@ # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. # -. ./include.sh +. ./include.ctest.sh exec ${examples_dir}/eccodes_f_grib_ecc-1316 diff --git a/examples/F90/grib_ecc-671.sh b/examples/F90/grib_ecc-671.sh index 37a607f05..d30e3d0c6 100755 --- a/examples/F90/grib_ecc-671.sh +++ b/examples/F90/grib_ecc-671.sh @@ -8,6 +8,6 @@ # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. # -. ./include.sh +. ./include.ctest.sh exec ${examples_dir}/eccodes_f_grib_ecc-671 diff --git a/examples/F90/grib_get_data.sh b/examples/F90/grib_get_data.sh index 46d2f56a1..a77a43ed3 100755 --- a/examples/F90/grib_get_data.sh +++ b/examples/F90/grib_get_data.sh @@ -7,6 +7,6 @@ # In applying this licence, ECMWF does not waive the privileges and immunities granted to it by # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. -. ./include.sh +. ./include.ctest.sh ${examples_dir}/eccodes_f_grib_get_data > /dev/null diff --git a/examples/F90/grib_get_keys.sh b/examples/F90/grib_get_keys.sh index 3f619e862..6d7ba8346 100755 --- a/examples/F90/grib_get_keys.sh +++ b/examples/F90/grib_get_keys.sh @@ -7,6 +7,6 @@ # In applying this licence, ECMWF does not waive the privileges and immunities granted to it by # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. -. ./include.sh +. ./include.ctest.sh ${examples_dir}/eccodes_f_grib_get_keys > /dev/null diff --git a/examples/F90/grib_get_pl.sh b/examples/F90/grib_get_pl.sh index 62448137e..0d58b9935 100755 --- a/examples/F90/grib_get_pl.sh +++ b/examples/F90/grib_get_pl.sh @@ -7,6 +7,6 @@ # In applying this licence, ECMWF does not waive the privileges and immunities granted to it by # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. -. ./include.sh +. ./include.ctest.sh ${examples_dir}/eccodes_f_grib_get_pl > /dev/null diff --git a/examples/F90/grib_get_pv.sh b/examples/F90/grib_get_pv.sh index c0dca3755..c1b1e3537 100755 --- a/examples/F90/grib_get_pv.sh +++ b/examples/F90/grib_get_pv.sh @@ -7,6 +7,6 @@ # In applying this licence, ECMWF does not waive the privileges and immunities granted to it by # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. -. ./include.sh +. ./include.ctest.sh ${examples_dir}/eccodes_f_grib_get_pv > /dev/null diff --git a/examples/F90/grib_get_set_uuid.sh b/examples/F90/grib_get_set_uuid.sh index 66254cf75..e11562713 100755 --- a/examples/F90/grib_get_set_uuid.sh +++ b/examples/F90/grib_get_set_uuid.sh @@ -7,7 +7,7 @@ # In applying this licence, ECMWF does not waive the privileges and immunities granted to it by # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. -. ./include.sh +. ./include.ctest.sh uuid=`${tools_dir}/grib_get -w count=1 -p uuidOfVGrid:s ${data_dir}/test_uuid.grib2` diff --git a/examples/F90/grib_index.sh b/examples/F90/grib_index.sh index 687e16444..581c134a7 100755 --- a/examples/F90/grib_index.sh +++ b/examples/F90/grib_index.sh @@ -7,7 +7,7 @@ # In applying this licence, ECMWF does not waive the privileges and immunities granted to it by # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. -. ./include.sh +. ./include.ctest.sh # if an index file does not exist then # create index and save to disk diff --git a/examples/F90/grib_keys_iterator.sh b/examples/F90/grib_keys_iterator.sh index 9699c5c3e..a093697c2 100755 --- a/examples/F90/grib_keys_iterator.sh +++ b/examples/F90/grib_keys_iterator.sh @@ -7,6 +7,6 @@ # In applying this licence, ECMWF does not waive the privileges and immunities granted to it by # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. -. ./include.sh +. ./include.ctest.sh ${examples_dir}/eccodes_f_grib_keys_iterator > /dev/null diff --git a/examples/F90/grib_multi.sh b/examples/F90/grib_multi.sh index 6aa776b29..b90c94b5a 100755 --- a/examples/F90/grib_multi.sh +++ b/examples/F90/grib_multi.sh @@ -7,7 +7,7 @@ # In applying this licence, ECMWF does not waive the privileges and immunities granted to it by # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. -. ./include.sh +. ./include.ctest.sh ${examples_dir}/eccodes_f_grib_multi > multi.out diff multi.out ${data_dir}/multi.ok diff --git a/examples/F90/grib_multi_write.sh b/examples/F90/grib_multi_write.sh index 02cb077a3..9af8efba4 100755 --- a/examples/F90/grib_multi_write.sh +++ b/examples/F90/grib_multi_write.sh @@ -7,7 +7,7 @@ # In applying this licence, ECMWF does not waive the privileges and immunities granted to it by # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. -. ./include.sh +. ./include.ctest.sh ${examples_dir}/eccodes_f_grib_multi_write > /dev/null diff --git a/examples/F90/grib_nearest.sh b/examples/F90/grib_nearest.sh index 589ada1df..604f202d2 100755 --- a/examples/F90/grib_nearest.sh +++ b/examples/F90/grib_nearest.sh @@ -7,6 +7,6 @@ # In applying this licence, ECMWF does not waive the privileges and immunities granted to it by # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. -. ./include.sh +. ./include.ctest.sh ${examples_dir}/eccodes_f_grib_nearest > /dev/null diff --git a/examples/F90/grib_precision.sh b/examples/F90/grib_precision.sh index b048c04e2..fe61f3237 100755 --- a/examples/F90/grib_precision.sh +++ b/examples/F90/grib_precision.sh @@ -7,7 +7,7 @@ # In applying this licence, ECMWF does not waive the privileges and immunities granted to it by # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. -. ./include.sh +. ./include.ctest.sh ${examples_dir}/eccodes_f_grib_precision > /dev/null rm -f ${data_dir}/regular_latlon_surface_prec.grib1 diff --git a/examples/F90/grib_print_data.sh b/examples/F90/grib_print_data.sh index 5a27fbbd0..f2096c8a4 100755 --- a/examples/F90/grib_print_data.sh +++ b/examples/F90/grib_print_data.sh @@ -7,7 +7,7 @@ # In applying this licence, ECMWF does not waive the privileges and immunities granted to it by # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. -. ./include.sh +. ./include.ctest.sh ${examples_dir}/eccodes_f_grib_print_data | grep '99200 *values found' ${examples_dir}/eccodes_f_grib_print_data_static | grep '496 *values found' diff --git a/examples/F90/grib_read_from_file.sh b/examples/F90/grib_read_from_file.sh index 5b8820df9..d2447f764 100755 --- a/examples/F90/grib_read_from_file.sh +++ b/examples/F90/grib_read_from_file.sh @@ -7,7 +7,7 @@ # In applying this licence, ECMWF does not waive the privileges and immunities granted to it by # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. -. ./include.sh +. ./include.ctest.sh # # Check program completed successfully. We have to resort to testing diff --git a/examples/F90/grib_read_message.sh b/examples/F90/grib_read_message.sh index 0b5687505..2f1a6aa9b 100755 --- a/examples/F90/grib_read_message.sh +++ b/examples/F90/grib_read_message.sh @@ -7,7 +7,7 @@ # In applying this licence, ECMWF does not waive the privileges and immunities granted to it by # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. -. ./include.sh +. ./include.ctest.sh in=../../data/index.grib out=out.readmsg.grib diff --git a/examples/F90/grib_samples.sh b/examples/F90/grib_samples.sh index daecadde5..97548bc17 100755 --- a/examples/F90/grib_samples.sh +++ b/examples/F90/grib_samples.sh @@ -7,7 +7,7 @@ # In applying this licence, ECMWF does not waive the privileges and immunities granted to it by # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. -. ./include.sh +. ./include.ctest.sh # Take a GRIB file in the data folder and make it a sample file (extension .tmpl) rm -f ${data_dir}/regular_latlon_surface.grib1.tmpl diff --git a/examples/F90/grib_set_bitmap.sh b/examples/F90/grib_set_bitmap.sh index 5281a85db..b051bb899 100755 --- a/examples/F90/grib_set_bitmap.sh +++ b/examples/F90/grib_set_bitmap.sh @@ -7,7 +7,7 @@ # In applying this licence, ECMWF does not waive the privileges and immunities granted to it by # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. -. ./include.sh +. ./include.ctest.sh OUT_TMP=out.set_bitmap_f.grib diff --git a/examples/F90/grib_set_data.sh b/examples/F90/grib_set_data.sh index f9810fb9e..f4f1ec553 100755 --- a/examples/F90/grib_set_data.sh +++ b/examples/F90/grib_set_data.sh @@ -7,7 +7,7 @@ # In applying this licence, ECMWF does not waive the privileges and immunities granted to it by # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. -. ./include.sh +. ./include.ctest.sh OUT=temp.f_grib_set_data.out.grib diff --git a/examples/F90/grib_set_keys.sh b/examples/F90/grib_set_keys.sh index 58bd91d41..2eda02fc4 100755 --- a/examples/F90/grib_set_keys.sh +++ b/examples/F90/grib_set_keys.sh @@ -7,7 +7,7 @@ # In applying this licence, ECMWF does not waive the privileges and immunities granted to it by # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. -. ./include.sh +. ./include.ctest.sh ${examples_dir}/eccodes_f_grib_set_keys > /dev/null res=`${tools_dir}/grib_get -p centre out.set.grib1` diff --git a/examples/F90/grib_set_missing.sh b/examples/F90/grib_set_missing.sh index ceab6a360..ea2925ef2 100755 --- a/examples/F90/grib_set_missing.sh +++ b/examples/F90/grib_set_missing.sh @@ -7,7 +7,7 @@ # In applying this licence, ECMWF does not waive the privileges and immunities granted to it by # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. -. ./include.sh +. ./include.ctest.sh ${examples_dir}/eccodes_f_grib_set_missing > /dev/null rm -f f_out_surface_level.grib2 diff --git a/examples/F90/grib_set_packing.sh b/examples/F90/grib_set_packing.sh index 9ece9c13c..e88f40be1 100755 --- a/examples/F90/grib_set_packing.sh +++ b/examples/F90/grib_set_packing.sh @@ -7,7 +7,7 @@ # In applying this licence, ECMWF does not waive the privileges and immunities granted to it by # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. -. ./include.sh +. ./include.ctest.sh tempSimple=temp.f_grib_set_packing.simple.grib tempSecond=temp.f_grib_set_packing.second.grib diff --git a/examples/F90/grib_set_pv.sh b/examples/F90/grib_set_pv.sh index c7cd26009..05d465fb5 100755 --- a/examples/F90/grib_set_pv.sh +++ b/examples/F90/grib_set_pv.sh @@ -7,7 +7,7 @@ # In applying this licence, ECMWF does not waive the privileges and immunities granted to it by # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. -. ./include.sh +. ./include.ctest.sh ${examples_dir}/eccodes_f_grib_set_pv > /dev/null rm -f out.pv.grib1 diff --git a/examples/F90/include.ctest.sh.in b/examples/F90/include.ctest.sh.in index 822714cd1..054747238 100644 --- a/examples/F90/include.ctest.sh.in +++ b/examples/F90/include.ctest.sh.in @@ -3,6 +3,24 @@ set -eax echo "Script: $0" +# 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 + proj_dir=@PROJECT_SOURCE_DIR@ data_dir=@PROJECT_BINARY_DIR@/data HAVE_PRODUCT_BUFR=@HAVE_PRODUCT_BUFR@ diff --git a/tests/grib_compare.sh b/tests/grib_compare.sh index ad09403c0..909a8648b 100755 --- a/tests/grib_compare.sh +++ b/tests/grib_compare.sh @@ -59,7 +59,7 @@ status=$? set -e [ $status -eq 1 ] grep -q "ERROR:.*Is a directory" $temp_err -rm -rf $temp_dir +rm -rf $temp_dir $temp_err # ----------------------------------------