mirror of https://github.com/ecmwf/eccodes.git
Testing: Test for bufrTemplates concept
This commit is contained in:
parent
a276066329
commit
9292bc7e9f
|
@ -87,6 +87,7 @@ if( HAVE_BUILD_TOOLS )
|
|||
bufr_ecc-359
|
||||
bufr_ecc-517
|
||||
bufr_rdbSubTypes
|
||||
bufr_templates
|
||||
grib_efas
|
||||
grib_sh_imag
|
||||
grib_sh_spectral_complex
|
||||
|
|
|
@ -21,6 +21,7 @@ TESTS = definitions.sh \
|
|||
bufr_get.sh \
|
||||
bufr_ls.sh \
|
||||
bufr_set.sh \
|
||||
bufr_templates.sh \
|
||||
bufr_change_edition.sh \
|
||||
gts_ls.sh \
|
||||
gts_compare.sh \
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
#!/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.sh
|
||||
|
||||
set -u
|
||||
label="bufr_templates_test"
|
||||
|
||||
temp=${label}.bufr
|
||||
sample=$ECCODES_SAMPLES_PATH/BUFR4.tmpl
|
||||
|
||||
templates_file="${ECCODES_DEFINITION_PATH}/bufr/templates/BufrTemplate.def"
|
||||
templates=`cat $templates_file | awk -F= '{print $1}' | tr -d '"'`
|
||||
for t in $templates; do
|
||||
${tools_dir}/bufr_set -s bufrTemplate=$t $sample $temp
|
||||
${tools_dir}/bufr_dump -p $temp > /dev/null
|
||||
done
|
||||
|
||||
rm -f $temp
|
Loading…
Reference in New Issue