Testing: BUFR new from samples

This commit is contained in:
Shahram Najm 2024-01-23 14:50:53 +00:00
parent 44adab0569
commit f09051b3f5
1 changed files with 12 additions and 8 deletions

View File

@ -10,16 +10,20 @@
. ./include.ctest.sh . ./include.ctest.sh
OUTPUT=temp.ecc-517.bufr label="bufr_ecc-517_test"
TEMP=temp.ecc-517.txt tempBufr=temp.$label.bufr
tempText=temp.$label.txt
# Run program to create output BUFR file with replication # Run program to create output BUFR file with replication
$EXEC ${test_dir}/bufr_ecc-517 $OUTPUT export ECCODES_DEBUG=-1
$EXEC ${test_dir}/bufr_ecc-517 $tempBufr > $tempText 2>&1
unset ECCODES_DEBUG
rm -f $tempText
# Check file is OK and has the expected number of descriptors # Check file is OK and has the expected number of descriptors
${tools_dir}/bufr_dump -jf $OUTPUT > $TEMP ${tools_dir}/bufr_dump -jf $tempBufr > $tempText
count=`grep -c extendedVerticalSoundingSignificance $TEMP` count=$(grep -c extendedVerticalSoundingSignificance $tempText)
[ $count -eq 487 ] [ $count -eq 487 ]
# Clean up
rm $OUTPUT $TEMP rm $tempBufr $tempText