mirror of https://github.com/ecmwf/eccodes.git
CCSDS: Add test for data quality checks
This commit is contained in:
parent
df2f153fc7
commit
a3b6bb31e7
|
@ -9,7 +9,7 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
. ./include.ctest.sh
|
. ./include.ctest.sh
|
||||||
set -u
|
|
||||||
# ---------------------------------------------------------
|
# ---------------------------------------------------------
|
||||||
# Tests for data quality checks
|
# Tests for data quality checks
|
||||||
# ---------------------------------------------------------
|
# ---------------------------------------------------------
|
||||||
|
@ -22,6 +22,7 @@ tempGrib2=temp.${label}.grib2
|
||||||
|
|
||||||
sample_g1=$ECCODES_SAMPLES_PATH/GRIB1.tmpl
|
sample_g1=$ECCODES_SAMPLES_PATH/GRIB1.tmpl
|
||||||
sample_g2=$ECCODES_SAMPLES_PATH/GRIB2.tmpl
|
sample_g2=$ECCODES_SAMPLES_PATH/GRIB2.tmpl
|
||||||
|
sample_ccsds=$ECCODES_SAMPLES_PATH/ccsds_grib2.tmpl
|
||||||
|
|
||||||
# Start with clean environment
|
# Start with clean environment
|
||||||
unset ECCODES_GRIB_DATA_QUALITY_CHECKS
|
unset ECCODES_GRIB_DATA_QUALITY_CHECKS
|
||||||
|
@ -194,8 +195,19 @@ ${tools_dir}/grib_set -s paramId=260509,scaleValuesBy=1000 $sample_g2 $tempGrib2
|
||||||
status=$?
|
status=$?
|
||||||
set -e
|
set -e
|
||||||
[ $status -ne 0 ]
|
[ $status -ne 0 ]
|
||||||
|
unset ECCODES_EXTRA_DEFINITION_PATH
|
||||||
|
|
||||||
|
|
||||||
|
# Check CCSDS encoding too
|
||||||
|
# -------------------------
|
||||||
|
export ECCODES_GRIB_DATA_QUALITY_CHECKS=1
|
||||||
|
set +e
|
||||||
|
${tools_dir}/grib_set -s scaleValuesBy=1000 $sample_ccsds $tempGrib2 2>$tempErr
|
||||||
|
status=$?
|
||||||
|
set -e
|
||||||
|
[ $status -ne 0 ]
|
||||||
|
grep -q "maximum (1000) is more than the allowable limit" $tempErr
|
||||||
|
|
||||||
|
|
||||||
# Clean up
|
# Clean up
|
||||||
rm -rf $tempDir
|
rm -rf $tempDir
|
||||||
|
|
Loading…
Reference in New Issue