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,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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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`"
|
||||
|
|
Loading…
Reference in New Issue