Testing: use consistent labelling

This commit is contained in:
Shahram Najm 2022-06-01 16:02:34 +01:00
parent c1e85cff6d
commit 2c11c7ad9c
30 changed files with 67 additions and 29 deletions

View File

@ -101,6 +101,7 @@ if( HAVE_BUILD_TOOLS )
bufr_ecc-1290 bufr_ecc-1290
bufr_ecc-1304 bufr_ecc-1304
bufr_ecc-1347 bufr_ecc-1347
bufr_ecc-1395
bufr_json_samples bufr_json_samples
bufr_ecc-359 bufr_ecc-359
bufr_ecc-517 bufr_ecc-517

View File

@ -14,7 +14,7 @@
# This is the test for the JIRA issue ECC-1187 # This is the test for the JIRA issue ECC-1187
# BUFR: codes_set_missing() # BUFR: codes_set_missing()
# --------------------------------------------------------- # ---------------------------------------------------------
label="bufr_ecc-1187-test" label="bufr_ecc-1187_test"
tempOut=temp.${label}.out tempOut=temp.${label}.out
tempRules=temp.${label}.filter tempRules=temp.${label}.filter

View File

@ -11,7 +11,7 @@
. ./include.ctest.sh . ./include.ctest.sh
set -u set -u
label="bufr_ecc-1195-test" label="bufr_ecc-1195_test"
temp1=temp.$label.bufr temp1=temp.$label.bufr
temp2=temp.$label.txt temp2=temp.$label.txt
sample_bufr3=$ECCODES_SAMPLES_PATH/BUFR3_local.tmpl sample_bufr3=$ECCODES_SAMPLES_PATH/BUFR3_local.tmpl

View File

@ -11,7 +11,7 @@
. ./include.ctest.sh . ./include.ctest.sh
set -u set -u
REDIRECT=/dev/null REDIRECT=/dev/null
label="bufr_ecc-1259-test" label="bufr_ecc-1259_test"
tempBufr=temp.$label.bufr tempBufr=temp.$label.bufr
tempFilt=temp.$label.filt tempFilt=temp.$label.filt

View File

@ -15,7 +15,7 @@
# It tests decoding a BUFR file which cannot be done unless # It tests decoding a BUFR file which cannot be done unless
# we extend the definitions to include extra files # we extend the definitions to include extra files
# --------------------------------------------------------- # ---------------------------------------------------------
label="bufr_ecc-1288-test" label="bufr_ecc-1288_test"
TEMP=${label}.temp TEMP=${label}.temp
LOG=${label}.log LOG=${label}.log

View File

@ -11,7 +11,7 @@
. ./include.ctest.sh . ./include.ctest.sh
set -u set -u
REDIRECT=/dev/null REDIRECT=/dev/null
label="bufr_ecc-1290-test" label="bufr_ecc-1290_test"
temp=temp.$label temp=temp.$label
tempRules=temp.${label}.filter tempRules=temp.${label}.filter
tempBufr=temp.${label}.bufr tempBufr=temp.${label}.bufr

View File

@ -12,7 +12,7 @@
set -u set -u
REDIRECT=/dev/null REDIRECT=/dev/null
label="bufr_ecc-1304-test" label="bufr_ecc-1304_test"
tempBufr=temp.$label.bufr tempBufr=temp.$label.bufr
tempFilt=temp.$label.filt tempFilt=temp.$label.filt

View File

@ -11,7 +11,7 @@
. ./include.ctest.sh . ./include.ctest.sh
set -u set -u
REDIRECT=/dev/null REDIRECT=/dev/null
label="bufr_ecc-1305-test" label="bufr_ecc-1305_test"
temp=temp.$label temp=temp.$label
# Check the operator name is printed # Check the operator name is printed

View File

@ -12,7 +12,7 @@
set -u set -u
label="bufr_ecc-1347-test" label="bufr_ecc-1347_test"
tempBufr=temp.$label.bufr tempBufr=temp.$label.bufr
tempFilt=temp.$label.filter tempFilt=temp.$label.filter

37
tests/bufr_ecc-1395.sh Executable file
View File

@ -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-1395_test"
temp=temp.$label
tempBufr=temp.$label.bufr
tempFilt=temp.$label.filt
tempOut=temp.$label.out
sample_bufr4=$ECCODES_SAMPLES_PATH/BUFR4.tmpl
# Pick a descriptor that does not exist in version 19
cat > $tempFilt <<EOF
set masterTablesVersionNumber = 19;
set unexpandedDescriptors = { 25195 }; # should fail
write;
EOF
set +e
${tools_dir}/bufr_filter -o $tempBufr $tempFilt $sample_bufr4 # > $tempOut
status=$?
set -e
# TODO check status
rm -f $tempFilt $tempBufr $tempOut

View File

@ -15,7 +15,7 @@
# It tests decoding a BUFR file which cannot be done unless # It tests decoding a BUFR file which cannot be done unless
# we extend the definitions to include extra files # we extend the definitions to include extra files
# --------------------------------------------------------- # ---------------------------------------------------------
label="bufr_ecc-197-test" label="bufr_ecc-197_test"
input=${data_dir}/bufr/vos308014_v3_26.bufr input=${data_dir}/bufr/vos308014_v3_26.bufr
TEMP=${label}.temp TEMP=${label}.temp

View File

@ -15,7 +15,7 @@
# It tests setting a key which starts with a digit # It tests setting a key which starts with a digit
# --------------------------------------------------------- # ---------------------------------------------------------
cd ${data_dir}/bufr cd ${data_dir}/bufr
label="bufr_ecc_286_test" label="bufr_ecc-286_test"
tempRules=temp.${label}.filter tempRules=temp.${label}.filter
tempOut=temp.${label}.out tempOut=temp.${label}.out

View File

@ -15,7 +15,7 @@
# It tests bufr_compare with a relative tolerance # It tests bufr_compare with a relative tolerance
# --------------------------------------------------------- # ---------------------------------------------------------
cd ${data_dir}/bufr cd ${data_dir}/bufr
label="bufr_ecc_288_test" label="bufr_ecc-288_test"
tempRules=temp.${label}.filter tempRules=temp.${label}.filter
tempOut=temp.${label}.out tempOut=temp.${label}.out

View File

@ -14,7 +14,7 @@
# This is the test for the JIRA issue ECC-313. # This is the test for the JIRA issue ECC-313.
# It tests decoding a BUFR file which uses the operator 203YYY. # It tests decoding a BUFR file which uses the operator 203YYY.
# --------------------------------------------------------- # ---------------------------------------------------------
label="bufr_ecc-313-test" label="bufr_ecc-313_test"
tempRules=temp.${label}.filter tempRules=temp.${label}.filter
tempOut=temp.${label}.txt tempOut=temp.${label}.txt
tempRef=temp.${label}.ref tempRef=temp.${label}.ref

View File

@ -14,7 +14,7 @@
# This is the test for the JIRA issue ECC-359. # This is the test for the JIRA issue ECC-359.
# It tests calling 'pack=1' and nothing else! # It tests calling 'pack=1' and nothing else!
# --------------------------------------------------------- # ---------------------------------------------------------
label="bufr_ecc_359_test" label="bufr_ecc-359_test"
tempOut=temp.${label}.out tempOut=temp.${label}.out
BufrFile=$ECCODES_SAMPLES_PATH/BUFR4.tmpl BufrFile=$ECCODES_SAMPLES_PATH/BUFR4.tmpl

View File

@ -15,7 +15,7 @@
# BUFR encoding failing when value out of range # BUFR encoding failing when value out of range
# --------------------------------------------------------- # ---------------------------------------------------------
cd ${data_dir}/bufr cd ${data_dir}/bufr
label="bufr_ecc_379_test" label="bufr_ecc-379_test"
tempRules=temp.${label}.filter tempRules=temp.${label}.filter
tempOut=temp.${label}.bufr tempOut=temp.${label}.bufr

View File

@ -15,7 +15,7 @@
# It tests bufr_compare with a blacklist with rank # It tests bufr_compare with a blacklist with rank
# --------------------------------------------------------- # ---------------------------------------------------------
cd ${data_dir}/bufr cd ${data_dir}/bufr
label="bufr_ecc_393_test" label="bufr_ecc-393_test"
tempRules=temp.${label}.filter tempRules=temp.${label}.filter
tempOut=temp.${label}.bufr tempOut=temp.${label}.bufr

View File

@ -17,7 +17,7 @@
# rather than a single value # rather than a single value
# --------------------------------------------------------- # ---------------------------------------------------------
cd ${data_dir}/bufr cd ${data_dir}/bufr
label="bufr_ecc_428_test" label="bufr_ecc-428_test"
tempRules=temp.${label}.filter tempRules=temp.${label}.filter
tempText=temp.${label}.text tempText=temp.${label}.text

View File

@ -14,7 +14,7 @@
# This is the test for the JIRA issue ECC-433. # This is the test for the JIRA issue ECC-433.
# It tests decoding a BUFR file which uses the operator 206YYY. # It tests decoding a BUFR file which uses the operator 206YYY.
# --------------------------------------------------------- # ---------------------------------------------------------
label="bufr_ecc-433-test" label="bufr_ecc-433_test"
tempRules=temp.${label}.filter tempRules=temp.${label}.filter
tempOut=temp.${label}.txt tempOut=temp.${label}.txt
tempRef=temp.${label}.ref tempRef=temp.${label}.ref

View File

@ -15,7 +15,7 @@ set -u
# This is the test for the JIRA issue ECC-556. # This is the test for the JIRA issue ECC-556.
# It tests typicalDate for BUFR edition 4 # It tests typicalDate for BUFR edition 4
# --------------------------------------------------------- # ---------------------------------------------------------
label="bufr_ecc-556-test" label="bufr_ecc-556_test"
# In this BUFR message the typicalYear should have been encoded # In this BUFR message the typicalYear should have been encoded
# as 2012 but it is actually 12! # as 2012 but it is actually 12!

View File

@ -14,7 +14,7 @@
# This is the test for the JIRA issue ECC-616: # This is the test for the JIRA issue ECC-616:
# Cannot extract subsets when operator 203YYY is present # Cannot extract subsets when operator 203YYY is present
# --------------------------------------------------------- # ---------------------------------------------------------
label="bufr_ecc-616-test" label="bufr_ecc-616_test"
tempRules=temp.${label}.filter tempRules=temp.${label}.filter
tempOut=temp.${label}.txt tempOut=temp.${label}.txt
tempRef=temp.${label}.ref tempRef=temp.${label}.ref

View File

@ -15,7 +15,7 @@
# bufr_filter script and paths with spaces # bufr_filter script and paths with spaces
# --------------------------------------------------------- # ---------------------------------------------------------
cd ${data_dir}/bufr cd ${data_dir}/bufr
label="bufr_ecc_673_test" label="bufr_ecc-673_test"
tempBufr=temp.${label}.bufr tempBufr=temp.${label}.bufr
tempRules=temp.${label}.filter tempRules=temp.${label}.filter

View File

@ -14,7 +14,7 @@
# This is the test for the JIRA issue ECC-680: # This is the test for the JIRA issue ECC-680:
# BUFR operator 203YYY: implement encoding # BUFR operator 203YYY: implement encoding
# --------------------------------------------------------- # ---------------------------------------------------------
label="bufr_ecc-680-test" label="bufr_ecc-680_test"
tempBufr=temp.$label.bufr tempBufr=temp.$label.bufr
tempFilt=temp.${label}.filter tempFilt=temp.${label}.filter

View File

@ -14,7 +14,7 @@
# This is the test for the JIRA issue ECC-686. # This is the test for the JIRA issue ECC-686.
# It tests changing the subtype in the ECMWF local section # It tests changing the subtype in the ECMWF local section
# --------------------------------------------------------- # ---------------------------------------------------------
label="bufr_ecc-686-test" label="bufr_ecc-686_test"
tempRules=temp.${label}.filter tempRules=temp.${label}.filter
tempBufr=temp.${label}.bufr tempBufr=temp.${label}.bufr

View File

@ -15,7 +15,7 @@
# Decoding NOAA GOES message percent confidence values # Decoding NOAA GOES message percent confidence values
# which do not have a bitmap. # which do not have a bitmap.
# --------------------------------------------------------- # ---------------------------------------------------------
label="bufr_ecc-690-test" label="bufr_ecc-690_test"
tempRules=temp.${label}.filter tempRules=temp.${label}.filter
tempOut=temp.${label}.txt tempOut=temp.${label}.txt
tempBufr=temp.${label}.bufr tempBufr=temp.${label}.bufr

View File

@ -14,7 +14,7 @@
# This is the test for the JIRA issue ECC-750. # This is the test for the JIRA issue ECC-750.
# Encoding values which exceed the maximum allowed # Encoding values which exceed the maximum allowed
# --------------------------------------------------------- # ---------------------------------------------------------
label="bufr_ecc-750-test" label="bufr_ecc-750_test"
tempRules=temp.${label}.filter tempRules=temp.${label}.filter
tempBufr=temp.${label}.bufr tempBufr=temp.${label}.bufr

View File

@ -14,7 +14,7 @@
# This is the test for the JIRA issue ECC-765. # This is the test for the JIRA issue ECC-765.
# BUFR decoding memory leaks # BUFR decoding memory leaks
# --------------------------------------------------------- # ---------------------------------------------------------
label="bufr_ecc-765-test" label="bufr_ecc-765_test"
tempLog=temp.${label}.log tempLog=temp.${label}.log
tempSupp=temp.${label}.supp tempSupp=temp.${label}.supp
tempFilt=temp.${label}.filt tempFilt=temp.${label}.filt

View File

@ -14,7 +14,7 @@
# This is the test for the JIRA issue ECC-875 # This is the test for the JIRA issue ECC-875
# bufr_copy with -g option to copy the GTS header # bufr_copy with -g option to copy the GTS header
# --------------------------------------------------------- # ---------------------------------------------------------
label="bufr_ecc-875-test" label="bufr_ecc-875_test"
tempOut=temp.${label}.out tempOut=temp.${label}.out
tempRef=temp.${label}.ref tempRef=temp.${label}.ref
tempBufr=temp.${label}.bufr tempBufr=temp.${label}.bufr

View File

@ -14,7 +14,7 @@
# This is the test for the JIRA issue ECC-887 # This is the test for the JIRA issue ECC-887
# BUFR: Search by condition does not work for floating point value # BUFR: Search by condition does not work for floating point value
# --------------------------------------------------------- # ---------------------------------------------------------
label="bufr_ecc-887-test" label="bufr_ecc-887_test"
tempOut=temp.${label}.out tempOut=temp.${label}.out
tempRules=temp.${label}.filter tempRules=temp.${label}.filter

View File

@ -15,7 +15,7 @@ fi
TEST_TITLE="$1" TEST_TITLE="$1"
# Check label is unique # Check label is unique
grep -q "label=\"$TEST_TITLE\"" $TEST_DIR/*.sh grep -i -q "label=\"$TEST_TITLE\"" $TEST_DIR/*.sh
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
echo "ERROR: Test label \"$TEST_TITLE\" seems to already exist!" echo "ERROR: Test label \"$TEST_TITLE\" seems to already exist!"
grep -l "label=\"$TEST_TITLE\"" $TEST_DIR/*.sh # Show results grep -l "label=\"$TEST_TITLE\"" $TEST_DIR/*.sh # Show results
@ -36,7 +36,7 @@ cat <<EOF
. ./include.ctest.sh . ./include.ctest.sh
set -u set -u
REDIRECT=/dev/null REDIRECT=/dev/null
label="prod_${TEST_TITLE}-test" label="prod_${TEST_TITLE}_test" # Change prod to bufr or grib etc
temp=temp.\$label temp=temp.\$label
sample_grib1=\$ECCODES_SAMPLES_PATH/GRIB1.tmpl sample_grib1=\$ECCODES_SAMPLES_PATH/GRIB1.tmpl
sample_grib2=\$ECCODES_SAMPLES_PATH/GRIB2.tmpl sample_grib2=\$ECCODES_SAMPLES_PATH/GRIB2.tmpl