diff --git a/tests/bufr_filter.sh b/tests/bufr_filter.sh index 3a37adfd9..3ac55d058 100755 --- a/tests/bufr_filter.sh +++ b/tests/bufr_filter.sh @@ -636,6 +636,7 @@ EOF #Clean up rm -f ${dSplit}/* +rmdir ${dSplit} rm -f $fLog $fRules rm -f $fBufrTmp @@ -877,7 +878,7 @@ diff ${fOut}.log.ref ${fOut}.log ${tools_dir}/bufr_compare ${fOut} ${fOut}.ref rm -f ${fOut}.log -rm -f $fLog $fRules ${fOut} +rm -f $fLog $fRules ${fOut} ${fOut}.log.ref #----------------------------------------------------------- # Test: add section 2 #----------------------------------------------------------- @@ -909,7 +910,7 @@ EOF fi rm -f ${fOut}.log -rm -f $fLog $fRules ${fOut} +rm -f $fLog $fRules ${fOut} ${fOut}.log.ref #----------------------------------------------------------- # Test: extract subsets uncompressed data diff --git a/tests/bufr_filter_extract_area.sh b/tests/bufr_filter_extract_area.sh index 426cc65c9..ace3f85a0 100755 --- a/tests/bufr_filter_extract_area.sh +++ b/tests/bufr_filter_extract_area.sh @@ -136,6 +136,7 @@ fieldOfViewNumber=7 8 9 10 11 12 13 8 9 10 11 12 11 12 EOF diff $outputRef $outputFilt +rm -f $outputBufr # Uncompressed message # --------------------- diff --git a/tests/bufr_get.sh b/tests/bufr_get.sh index d0b3d77d8..26633d503 100755 --- a/tests/bufr_get.sh +++ b/tests/bufr_get.sh @@ -10,22 +10,23 @@ . ./include.sh -#Enter data dir +# Enter data dir cd ${data_dir}/bufr -#Define a common label for all the tmp files +# Define a common label for all the tmp files label="bufr_get_test" -#Create log file +# Create log file fLog=${label}".log" rm -f $fLog touch $fLog -#Define tmp file +# Define tmp file fTmp=${label}".tmp.txt" -rm -f $fTmp +tempRef=${label}".tmp.ref.txt" +rm -f $fTmp $tempRef -#Define another tmp file to store the test results +# Define another tmp file to store the test results res_get=${label}".get.test" rm -f $res_get @@ -41,14 +42,14 @@ id=`${tools_dir}/bufr_get -p edition,identifier aaen_55.bufr` #------------------------------------------- f="aaen_55.bufr" -#The reference is the same as for ls +# The reference is the same as for ls ref_get=$f".ls.ref" echo "Test: -p switch" >> $fLog echo "file: $f" >> $fLog ${tools_dir}/bufr_get -p totalLength,bufrHeaderCentre,bufrHeaderSubCentre,masterTableNumber,masterTablesVersionNumber,localTablesVersionNumber,numberOfSubsets,localNumberOfObservations $f > $fTmp -#Write the values into a file and compare with ref +# Write the values into a file and compare with ref cat $fTmp | awk '{split($0,a," "); for (i=1; i<=8; i++) print a[i]}' > $res_get diff $ref_get $res_get @@ -71,6 +72,19 @@ result=`${tools_dir}/bufr_get -m aaen_55.bufr` [ "$result" = "55 20121102 0000" ] result=`${tools_dir}/bufr_get -m syno_1.bufr` [ "$result" = "1 20121030 0000 91334" ] +${tools_dir}/bufr_ls -j -m syno_1.bufr > $fTmp +cat > $tempRef <$REDIRECT 2> $REDIRECT fi + rm -f ${file}.json done