mirror of https://github.com/ecmwf/eccodes.git
Testing: use HAVE_EXTRA_TESTS in scripts
This commit is contained in:
parent
49f0af6805
commit
13d9cc604d
|
@ -64,14 +64,11 @@ tigge_af_ecmwf.grib2
|
||||||
tigge_cf_ecmwf.grib2
|
tigge_cf_ecmwf.grib2
|
||||||
"
|
"
|
||||||
|
|
||||||
set +u
|
# Check if JPEG is enabled
|
||||||
# Check HAVE_JPEG is defined and is equal to 1
|
|
||||||
if [ "x$HAVE_JPEG" != x ]; then
|
|
||||||
if [ $HAVE_JPEG -eq 1 ]; then
|
if [ $HAVE_JPEG -eq 1 ]; then
|
||||||
# Include files which have messages with grid_jpeg packing
|
# Include files which have messages with grid_jpeg packing
|
||||||
files="jpeg.grib2 multi.grib2 reduced_gaussian_surface_jpeg.grib2 v.grib2 "$files
|
files="jpeg.grib2 multi.grib2 reduced_gaussian_surface_jpeg.grib2 v.grib2 "$files
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
|
|
||||||
for file in $files; do
|
for file in $files; do
|
||||||
if [ -f ${data_dir}/$file ]; then
|
if [ -f ${data_dir}/$file ]; then
|
||||||
|
@ -86,4 +83,5 @@ for file in $files; do
|
||||||
set -e
|
set -e
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
rm -f $temp
|
rm -f $temp
|
||||||
|
|
|
@ -16,7 +16,7 @@ this_test="octa_grid.test"
|
||||||
temp=temp.$this_test
|
temp=temp.$this_test
|
||||||
|
|
||||||
# All our current GRIB samples (with reduced gaussian grids) are NON-Octahedral
|
# 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"
|
grib_check_key_equals $s "isOctahedral" "0"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@ -27,9 +27,12 @@ grib_check_key_equals $input "global,isOctahedral" "1 1"
|
||||||
# Check numberOfDataPoints
|
# Check numberOfDataPoints
|
||||||
grib_check_key_equals $input "numberOfDataPoints,numberOfCodedValues" "6599680 6599680"
|
grib_check_key_equals $input "numberOfDataPoints,numberOfCodedValues" "6599680 6599680"
|
||||||
|
|
||||||
# Iterator
|
|
||||||
|
# Only do lengthy iterator test if extra tests are enabled
|
||||||
|
if [ $HAVE_EXTRA_TESTS -eq 1 ]; then
|
||||||
${tools_dir}/grib_get_data $input > $temp
|
${tools_dir}/grib_get_data $input > $temp
|
||||||
numlines=`wc -l $temp | awk '{print $1}'`
|
numlines=`wc -l $temp | awk '{print $1}'`
|
||||||
[ "$numlines" = "6599681" ] # 1 + numberOfDataPoints
|
[ "$numlines" = "6599681" ] # 1 + numberOfDataPoints
|
||||||
|
fi
|
||||||
|
|
||||||
rm -f $temp
|
rm -f $temp
|
||||||
|
|
|
@ -51,17 +51,12 @@ $grib_util_set_spec $infile $outfile > /dev/null
|
||||||
grib_check_key_equals $outfile section2Used 0
|
grib_check_key_equals $outfile section2Used 0
|
||||||
|
|
||||||
# Convert to edition2 and use JPEG for packing
|
# 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
|
infile=../data/latlon.grib
|
||||||
$grib_util_set_spec -e 2 -p grid_jpeg $infile $outfile > /dev/null
|
$grib_util_set_spec -e 2 -p grid_jpeg $infile $outfile > /dev/null
|
||||||
res=`${tools_dir}/grib_get -p edition,section2Used,packingType $outfile`
|
res=`${tools_dir}/grib_get -p edition,section2Used,packingType $outfile`
|
||||||
[ "$res" = "2 1 grid_jpeg" ]
|
[ "$res" = "2 1 grid_jpeg" ]
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
set -u
|
|
||||||
|
|
||||||
# --------------------------------------------------
|
# --------------------------------------------------
|
||||||
# Reduced Gaussian Grid N=32 second order packing
|
# Reduced Gaussian Grid N=32 second order packing
|
||||||
|
|
|
@ -39,5 +39,6 @@ HAVE_LIBJASPER=@HAVE_LIBJASPER@
|
||||||
HAVE_LIBOPENJPEG=@HAVE_LIBOPENJPEG@
|
HAVE_LIBOPENJPEG=@HAVE_LIBOPENJPEG@
|
||||||
HAVE_PNG=@HAVE_PNG@
|
HAVE_PNG=@HAVE_PNG@
|
||||||
HAVE_AEC=@HAVE_AEC@
|
HAVE_AEC=@HAVE_AEC@
|
||||||
|
HAVE_EXTRA_TESTS=@HAVE_EXTRA_TESTS@
|
||||||
|
|
||||||
echo "Current directory: `pwd`"
|
echo "Current directory: `pwd`"
|
||||||
|
|
Loading…
Reference in New Issue