diff --git a/tests/grib_calendar.sh b/tests/grib_calendar.sh index a523158a1..c877e798a 100755 --- a/tests/grib_calendar.sh +++ b/tests/grib_calendar.sh @@ -10,12 +10,12 @@ . ./include.ctest.sh +label="grib_calendar_test" -temp1=temp1.calendar.$$ -temp2=temp2.calendar.$$ +temp1=temp1.$label.$$ +temp2=temp2.$label.$$ sample=$ECCODES_SAMPLES_PATH/GRIB2.tmpl - ${tools_dir}/grib_set -s tablesVersion=13,setCalendarId=1,typeOfCalendar=0 $sample $temp1 grib_check_key_equals $temp1 calendarIdPresent 1 grib_check_key_equals $temp1 section1Length 24 diff --git a/tests/grib_multi.sh b/tests/grib_multi.sh index 2228a314f..f8e2d94d8 100755 --- a/tests/grib_multi.sh +++ b/tests/grib_multi.sh @@ -10,13 +10,13 @@ . ./include.ctest.sh -tmpdata=grib_multi.$$.grib +label="grib_multi_test" +tmpdata=temp.$label.$$.grib rm -f $tmpdata parameterNumber=`${tools_dir}/grib_get -p parameterNumber -w parameterCategory=2,parameterNumber=3 ${data_dir}/multi.grib2` -if [ -z "$parameterNumber" ] -then - echo ---------- grib_get failure +if [ -z "$parameterNumber" ]; then + echo '---------- grib_get failure' exit 1 fi @@ -24,15 +24,14 @@ ${tools_dir}/grib_copy -w parameterCategory=2,parameterNumber=3 ${data_dir}/mult ${tools_dir}/grib_compare ${data_dir}/v.grib2 $tmpdata.1 cat > $tmpdata.rules < $$_f < $tempFilt < $l2" ${tools_dir}/grib_set -M -s localDefinitionNumber=$l2 locx.grib1 locy.grib1 - ${tools_dir}/grib_filter -M $$_f locy.grib1 + ${tools_dir}/grib_filter -M $tempFilt locy.grib1 + count=$((count+1)) fi done done - -rm -f $$_f locx.grib1 locy.grib1 $temp +echo Did $count iterations +rm -f locx.grib1 locy.grib1 $tempGrib $tempFilt diff --git a/tests/grib_set_bytes.cc b/tests/grib_set_bytes.cc index 8dfc651d1..6fc7e434b 100644 --- a/tests/grib_set_bytes.cc +++ b/tests/grib_set_bytes.cc @@ -20,7 +20,7 @@ int main(int argc, char** argv) FILE* in = NULL; const char* infile = "../data/test_uuid.grib2"; FILE* out = NULL; - const char* outfile = "temp.grib_set_bytes.grib"; + const char* outfile = "temp.grib_set_bytes_test.grib"; grib_handle* h = NULL; const void* buffer = NULL; diff --git a/tests/grib_set_bytes.sh b/tests/grib_set_bytes.sh index 4aaeefd06..454044ebf 100755 --- a/tests/grib_set_bytes.sh +++ b/tests/grib_set_bytes.sh @@ -9,14 +9,17 @@ # . ./include.ctest.sh -TEMP_ERR=temp.grib_set_bytes.log -TEMP_OUT=temp.grib_set_bytes.grib -$EXEC ${test_dir}/grib_set_bytes 2>$TEMP_ERR +label="grib_set_bytes_test" -grep -q "Wrong size.*for uuidOfVGrid. It is 16 bytes long" $TEMP_ERR +tempErr=temp.$label.log +tempOut=temp.$label.grib -uuid=`${tools_dir}/grib_get -p uuidOfVGrid $TEMP_OUT` +$EXEC ${test_dir}/grib_set_bytes 2>$tempErr + +grep -q "Wrong size.*for uuidOfVGrid. It is 16 bytes long" $tempErr + +uuid=`${tools_dir}/grib_get -p uuidOfVGrid $tempOut` [ "$uuid" = "07204051072040510720405207204053" ] -rm -f $TEMP_OUT $TEMP_ERR +rm -f $tempOut $tempErr diff --git a/tests/grib_sh_imag.sh b/tests/grib_sh_imag.sh index 3323f3227..26b07585b 100755 --- a/tests/grib_sh_imag.sh +++ b/tests/grib_sh_imag.sh @@ -10,7 +10,10 @@ . ./include.ctest.sh -TEMP=output.grib_sh_imag.grib -$EXEC ${test_dir}/grib_sh_imag $TEMP +# Check that first coefficient have an imaginary part equal to zero. +# philippe.marguinaud@meteo.fr, 2016/02 -rm -f $TEMP +tempGrib=output.grib_sh_imag.grib +$EXEC ${test_dir}/grib_sh_imag $tempGrib + +rm -f $tempGrib diff --git a/tests/grib_statistics.sh b/tests/grib_statistics.sh index 5be8ed60f..6863d591a 100755 --- a/tests/grib_statistics.sh +++ b/tests/grib_statistics.sh @@ -10,24 +10,24 @@ . ./include.ctest.sh +label="grib_statistics_test" +temp1=temp1.$label.grib +temp2=temp2.$label.grib + files="regular_latlon_surface.grib2 regular_latlon_surface.grib1" -for file in $files -do +for file in $files; do cat >statistics.filter< statistics.out @@ -42,8 +42,6 @@ rm -f statistics.out statistics.filter # See ECC-478 # --------------------------------------------------- input=${data_dir}/lfpw.grib1 -temp1=temp1.statistics.grib -temp2=temp2.statistics.grib stats=`${tools_dir}/grib_get -w count=50 -F%.2f -n statistics $input` [ "$stats" = "10098.00 0.00 1064.19 3066.07 2.57 4.61 0.00" ]