From 411b332592c55fbb225796be6cbd1b9b78f5d4b4 Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Sat, 18 Mar 2023 16:00:11 +0000 Subject: [PATCH] Testing: Consistent naming of temporary files --- tests/bufr_count.sh | 6 ++++-- tests/grib_iterator.sh | 6 +++--- tests/grib_local_NCEP.sh | 3 ++- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/tests/bufr_count.sh b/tests/bufr_count.sh index a00c3fee9..14c1e4f0f 100755 --- a/tests/bufr_count.sh +++ b/tests/bufr_count.sh @@ -10,6 +10,9 @@ . ./include.ctest.sh +label="bufr_count_test" +temp=temp.$label.truncated.bufr + # Enter data dir cd ${data_dir}/bufr input=syno_multi.bufr @@ -23,7 +26,6 @@ count=`${tools_dir}/codes_count $input` # Files with invalid (unreadable) messages # ----------------------------------------- -temp=$input.truncated # BUFR file size = 660 bytes. Write out only the first 640 bytes # thereby creating an unreadable final message head -c 640 $input > $temp @@ -39,5 +41,5 @@ set -e vcount=`${tools_dir}/bufr_count -f $temp` [ "$vcount" = "2" ] - +# Clean up rm -f $temp diff --git a/tests/grib_iterator.sh b/tests/grib_iterator.sh index b6c3b3bc2..c8e0ffe78 100755 --- a/tests/grib_iterator.sh +++ b/tests/grib_iterator.sh @@ -9,8 +9,9 @@ # . ./include.ctest.sh -set -u -temp=temp.grib_iterator.grib + +label="grib_iterator_test" +temp=temp.$label.txt files="reduced_latlon_surface.grib1 \ reduced_gaussian_pressure_level.grib1 \ @@ -37,7 +38,6 @@ ${tools_dir}/grib_get_data -L%12.6f%11.5f ${data_dir}/regular_latlon_surface.gri ${tools_dir}/grib_get_data -p shortName,level ${data_dir}/regular_latlon_surface.grib2 > $temp grep -q "Latitude Longitude Value shortName level" $temp - # Run on a spectral field - should just print out its values ${tools_dir}/grib_get_data "$samp_dir/sh_ml_grib2.tmpl" diff --git a/tests/grib_local_NCEP.sh b/tests/grib_local_NCEP.sh index 478b57a4b..1cb734fc8 100755 --- a/tests/grib_local_NCEP.sh +++ b/tests/grib_local_NCEP.sh @@ -10,7 +10,8 @@ . ./include.ctest.sh -temp=output.grib_local_NCEP.grib +label="grib_local_NCEP_test" +temp=temp.$label.grib sample=$ECCODES_SAMPLES_PATH/GRIB2.tmpl ${tools_dir}/grib_set -s centre=kwbc,discipline=3,parameterCategory=192,parameterNumber=35 $sample $temp