Tools: codes_export_resource test

This commit is contained in:
Shahram Najm 2022-03-12 18:51:00 +00:00
parent 549372d608
commit 470173a32c
1 changed files with 22 additions and 1 deletions

View File

@ -14,7 +14,7 @@ label="codes_export_resource_test"
temp=temp.$label
# Sample files
# --------------
# ----------------
f='GRIB2.tmpl'
${tools_dir}/codes_export_resource -s $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
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
# ----------------
f='boot.def'
@ -34,5 +39,21 @@ ${tools_dir}/codes_export_resource -d $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
rm -f $temp