diff --git a/tests/grib_dump_debug.sh b/tests/grib_dump_debug.sh index da83fff2a..f9a871596 100755 --- a/tests/grib_dump_debug.sh +++ b/tests/grib_dump_debug.sh @@ -64,13 +64,10 @@ tigge_af_ecmwf.grib2 tigge_cf_ecmwf.grib2 " -set +u -# Check HAVE_JPEG is defined and is equal to 1 -if [ "x$HAVE_JPEG" != x ]; then - if [ $HAVE_JPEG -eq 1 ]; then - # Include files which have messages with grid_jpeg packing - files="jpeg.grib2 multi.grib2 reduced_gaussian_surface_jpeg.grib2 v.grib2 "$files - fi +# Check if JPEG is enabled +if [ $HAVE_JPEG -eq 1 ]; then + # Include files which have messages with grid_jpeg packing + files="jpeg.grib2 multi.grib2 reduced_gaussian_surface_jpeg.grib2 v.grib2 "$files fi for file in $files; do @@ -86,4 +83,5 @@ for file in $files; do set -e fi done + rm -f $temp diff --git a/tests/grib_octahedral.sh b/tests/grib_octahedral.sh index d0690f645..e4ed9ea73 100755 --- a/tests/grib_octahedral.sh +++ b/tests/grib_octahedral.sh @@ -16,7 +16,7 @@ this_test="octa_grid.test" temp=temp.$this_test # All our current GRIB samples (with reduced gaussian grids) are NON-Octahedral -for s in $ECCODES_SAMPLES_PATH/reduced_gg_pl*tmpl; do +for s in $ECCODES_SAMPLES_PATH/reduced_gg_pl*.tmpl; do grib_check_key_equals $s "isOctahedral" "0" done @@ -27,9 +27,12 @@ grib_check_key_equals $input "global,isOctahedral" "1 1" # Check numberOfDataPoints grib_check_key_equals $input "numberOfDataPoints,numberOfCodedValues" "6599680 6599680" -# Iterator -${tools_dir}/grib_get_data $input > $temp -numlines=`wc -l $temp | awk '{print $1}'` -[ "$numlines" = "6599681" ] # 1 + numberOfDataPoints + +# Only do lengthy iterator test if extra tests are enabled +if [ $HAVE_EXTRA_TESTS -eq 1 ]; then + ${tools_dir}/grib_get_data $input > $temp + numlines=`wc -l $temp | awk '{print $1}'` + [ "$numlines" = "6599681" ] # 1 + numberOfDataPoints +fi rm -f $temp diff --git a/tests/grib_util_set_spec.sh b/tests/grib_util_set_spec.sh index c9aa29cf1..32b50410b 100755 --- a/tests/grib_util_set_spec.sh +++ b/tests/grib_util_set_spec.sh @@ -51,17 +51,12 @@ $grib_util_set_spec $infile $outfile > /dev/null grib_check_key_equals $outfile section2Used 0 # Convert to edition2 and use JPEG for packing -# Don't complain due to unbound variable -set +u -if [ x"$HAVE_JPEG" != "x" ]; then - if [ $HAVE_JPEG -eq 1 ]; then +if [ $HAVE_JPEG -eq 1 ]; then infile=../data/latlon.grib $grib_util_set_spec -e 2 -p grid_jpeg $infile $outfile > /dev/null res=`${tools_dir}/grib_get -p edition,section2Used,packingType $outfile` [ "$res" = "2 1 grid_jpeg" ] - fi fi -set -u # -------------------------------------------------- # Reduced Gaussian Grid N=32 second order packing diff --git a/tests/include.ctest.sh.in b/tests/include.ctest.sh.in index eee56083e..c4bb7931b 100644 --- a/tests/include.ctest.sh.in +++ b/tests/include.ctest.sh.in @@ -39,5 +39,6 @@ HAVE_LIBJASPER=@HAVE_LIBJASPER@ HAVE_LIBOPENJPEG=@HAVE_LIBOPENJPEG@ HAVE_PNG=@HAVE_PNG@ HAVE_AEC=@HAVE_AEC@ +HAVE_EXTRA_TESTS=@HAVE_EXTRA_TESTS@ echo "Current directory: `pwd`"