mirror of https://github.com/ecmwf/eccodes.git
ECC-1938: Test
This commit is contained in:
parent
2b0730694c
commit
234d21692d
|
@ -13,6 +13,7 @@ string(REGEX REPLACE "\n" ";" bufr_refs_to_download "${bufr_refs_to_download}")
|
|||
|
||||
# Exceptional case: download bufr files which have to be treated specially
|
||||
list(APPEND bufr_files_to_download "vos308014_v3_26.bufr") # See test ecc-197
|
||||
list(APPEND bufr_files_to_download "bad.bufr") # See ECC-1938
|
||||
|
||||
if( ENABLE_EXTRA_TESTS )
|
||||
ecbuild_get_test_multidata(
|
||||
|
|
|
@ -258,6 +258,7 @@ if( HAVE_BUILD_TOOLS )
|
|||
bufr_ecc-1476
|
||||
bufr_ecc-1623
|
||||
bufr_ecc-1785
|
||||
bufr_ecc-1938
|
||||
grib_ecc-490
|
||||
grib_ecc-756
|
||||
grib_ecc-806
|
||||
|
|
|
@ -0,0 +1,37 @@
|
|||
#!/bin/sh
|
||||
# (C) Copyright 2005- ECMWF.
|
||||
#
|
||||
# This software is licensed under the terms of the Apache Licence Version 2.0
|
||||
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
|
||||
#
|
||||
# In applying this licence, ECMWF does not waive the privileges and immunities granted to it by
|
||||
# virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
|
||||
#
|
||||
|
||||
. ./include.ctest.sh
|
||||
|
||||
REDIRECT=/dev/null
|
||||
|
||||
label="bufr_ecc-1938_test"
|
||||
|
||||
tempBufr=temp.$label.bufr
|
||||
tempLog=temp.$label.log
|
||||
tempOut=temp.$label.txt
|
||||
|
||||
sample_bufr4=$ECCODES_SAMPLES_PATH/BUFR4.tmpl
|
||||
|
||||
infile=${data_dir}/bufr/bad.bufr
|
||||
if [ -f "$infile" ]; then
|
||||
count=$( ${tools_dir}/bufr_count -f $infile )
|
||||
[ $count -eq 24 ]
|
||||
set +e
|
||||
${tools_dir}/bufr_copy $infile $tempBufr
|
||||
status=$?
|
||||
set -e
|
||||
[ $status -ne 0 ]
|
||||
count=$( ${tools_dir}/bufr_count $tempBufr )
|
||||
[ $count -eq 24 ]
|
||||
fi
|
||||
|
||||
# Clean up
|
||||
rm -f $tempBufr $tempLog $tempOut
|
Loading…
Reference in New Issue