mirror of https://github.com/ecmwf/eccodes.git
Tools: codes_export_resource test
This commit is contained in:
parent
549372d608
commit
470173a32c
|
@ -14,7 +14,7 @@ label="codes_export_resource_test"
|
||||||
temp=temp.$label
|
temp=temp.$label
|
||||||
|
|
||||||
# Sample files
|
# Sample files
|
||||||
# --------------
|
# ----------------
|
||||||
f='GRIB2.tmpl'
|
f='GRIB2.tmpl'
|
||||||
${tools_dir}/codes_export_resource -s $f $temp
|
${tools_dir}/codes_export_resource -s $f $temp
|
||||||
cmp $ECCODES_SAMPLES_PATH/$f $temp
|
cmp $ECCODES_SAMPLES_PATH/$f $temp
|
||||||
|
@ -23,6 +23,11 @@ cmp $ECCODES_SAMPLES_PATH/$f $temp
|
||||||
${tools_dir}/codes_export_resource -s GRIB2 $temp
|
${tools_dir}/codes_export_resource -s GRIB2 $temp
|
||||||
cmp $ECCODES_SAMPLES_PATH/GRIB2.tmpl $temp
|
cmp $ECCODES_SAMPLES_PATH/GRIB2.tmpl $temp
|
||||||
|
|
||||||
|
# IFS Samples
|
||||||
|
# ----------------
|
||||||
|
ECCODES_SAMPLES_PATH=/MEMFS/ifs_samples/grib1_mlgrib2 ${tools_dir}/codes_export_resource -s gg_ml.tmpl $temp
|
||||||
|
|
||||||
|
|
||||||
# Definition files
|
# Definition files
|
||||||
# ----------------
|
# ----------------
|
||||||
f='boot.def'
|
f='boot.def'
|
||||||
|
@ -34,5 +39,21 @@ ${tools_dir}/codes_export_resource -d $f $temp
|
||||||
cmp $ECCODES_DEFINITION_PATH/$f $temp
|
cmp $ECCODES_DEFINITION_PATH/$f $temp
|
||||||
|
|
||||||
|
|
||||||
|
# Failing cases
|
||||||
|
# ----------------
|
||||||
|
set +e
|
||||||
|
${tools_dir}/codes_export_resource -d nonexistent $temp
|
||||||
|
status=$?
|
||||||
|
set -e
|
||||||
|
[ $status -eq 1 ]
|
||||||
|
|
||||||
|
set +e
|
||||||
|
${tools_dir}/codes_export_resource -s nonexistent $temp
|
||||||
|
status=$?
|
||||||
|
set -e
|
||||||
|
[ $status -eq 1 ]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Clean up
|
# Clean up
|
||||||
rm -f $temp
|
rm -f $temp
|
||||||
|
|
Loading…
Reference in New Issue