From f09051b3f51499cc02931de2240c0f87cbf456ac Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Tue, 23 Jan 2024 14:50:53 +0000 Subject: [PATCH] Testing: BUFR new from samples --- tests/bufr_ecc-517.sh | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/tests/bufr_ecc-517.sh b/tests/bufr_ecc-517.sh index b20325376..82cdcb4c8 100755 --- a/tests/bufr_ecc-517.sh +++ b/tests/bufr_ecc-517.sh @@ -10,16 +10,20 @@ . ./include.ctest.sh -OUTPUT=temp.ecc-517.bufr -TEMP=temp.ecc-517.txt +label="bufr_ecc-517_test" +tempBufr=temp.$label.bufr +tempText=temp.$label.txt # 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 -${tools_dir}/bufr_dump -jf $OUTPUT > $TEMP -count=`grep -c extendedVerticalSoundingSignificance $TEMP` -[ $count -eq 487 ] +${tools_dir}/bufr_dump -jf $tempBufr > $tempText +count=$(grep -c extendedVerticalSoundingSignificance $tempText) +[ $count -eq 487 ] - -rm $OUTPUT $TEMP +# Clean up +rm $tempBufr $tempText