mirror of https://github.com/ecmwf/eccodes.git
Testing: Error conditions (indexing tools)
This commit is contained in:
parent
9c693eabab
commit
d061202a59
|
@ -12,6 +12,7 @@
|
|||
|
||||
label="bufr_indexing_test"
|
||||
tempIndex=temp.$label.$$.idx
|
||||
tempBufr=temp.$label.$$.bufr
|
||||
tempOut=temp.$label.$$.out
|
||||
tempRef=temp.$label.$$.ref
|
||||
|
||||
|
@ -41,5 +42,17 @@ ${tools_dir}/bufr_index_build -k mars.ident -o $tempIndex $infile |\
|
|||
grep -q "mars.ident = { 01001, 01003, 01007 }"
|
||||
|
||||
|
||||
# ------------------
|
||||
# Error conditions
|
||||
# ------------------
|
||||
echo BUFR > $tempBufr
|
||||
set +e
|
||||
${tools_dir}/bufr_index_build $tempBufr > $tempOut 2>&1
|
||||
status=$?
|
||||
set -e
|
||||
[ $status -ne 0 ]
|
||||
grep -q "End of resource reached" $tempOut
|
||||
|
||||
|
||||
# Clean up
|
||||
rm -f $tempIndex $tempOut $tempRef
|
||||
rm -f $tempIndex $tempOut $tempRef $tempBufr
|
||||
|
|
|
@ -67,6 +67,12 @@ status=$?
|
|||
set -e
|
||||
[ $status -eq 1 ]
|
||||
|
||||
set +e
|
||||
${tools_dir}/codes_export_resource -s GRIB2 /
|
||||
status=$?
|
||||
set -e
|
||||
[ $status -eq 1 ]
|
||||
|
||||
|
||||
# Clean up
|
||||
rm -f $temp
|
||||
|
|
|
@ -153,6 +153,18 @@ ${tools_dir}/grib_index_build -N -o $tempIndex1 $sample1 > /dev/null
|
|||
${tools_dir}/grib_dump $tempIndex1 >/dev/null
|
||||
|
||||
|
||||
# ------------------
|
||||
# Error conditions
|
||||
# ------------------
|
||||
echo GRIB > $tempGribFile1
|
||||
set +e
|
||||
${tools_dir}/grib_index_build $tempGribFile1 > $tempOut 2>&1
|
||||
status=$?
|
||||
set -e
|
||||
[ $status -ne 0 ]
|
||||
grep -q "End of resource reached" $tempOut
|
||||
|
||||
|
||||
# Clean up
|
||||
rm -f $tempOut $tempRef
|
||||
rm -f $tempIndex $tempIndex1 $tempIndex2 $tempGribFile1 $tempGribFile2
|
||||
|
|
Loading…
Reference in New Issue