Testing: Add test to detect missing version entry in 1.0.table

This commit is contained in:
Shahram Najm 2021-02-01 16:36:34 +00:00
parent e1bf054c9b
commit 8dd89b059d
1 changed files with 10 additions and 0 deletions

View File

@ -18,6 +18,7 @@ if [ ! -d "$ECCODES_DEFINITION_PATH" ]; then
fi
temp=temp.$label.grib2
sample1=$ECCODES_SAMPLES_PATH/GRIB1.tmpl
sample2=$ECCODES_SAMPLES_PATH/GRIB2.tmpl
tables_dir="$ECCODES_DEFINITION_PATH/grib2/tables"
@ -31,4 +32,13 @@ if [ "$latest" != "$highest_num" ]; then
exit 1
fi
# Also grib1 to grib2 conversion should set the correct version
${tools_dir}/grib_set -s edition=2 $sample1 $temp
tv=`${tools_dir}/grib_get -p tablesVersion $temp`
if [ "$tv" != "$latest" ]; then
echo "After conversion to GRIB2, tablesVersion=$tv. Should be $latest. Check definitions/grib2/tables/1.0.table"
exit 1
fi
# grib_check_key_equals $temp tablesVersion $latest
rm -f $temp