diff --git a/examples/python/binary_message.sh b/examples/python/binary_message.sh index 33adf6f21..385797b61 100755 --- a/examples/python/binary_message.sh +++ b/examples/python/binary_message.sh @@ -2,12 +2,10 @@ . ./include.sh -REDIRECT=/dev/null - INPUT=${data_dir}/tigge_pf_ecmwf.grib2 OUTPUT=out.grib -$PYTHON binary_message.py $INPUT $OUTPUT 2> $REDIRECT > $REDIRECT +$PYTHON binary_message.py $INPUT $OUTPUT ${tools_dir}/grib_compare $INPUT $OUTPUT rm $OUTPUT || true @@ -15,7 +13,7 @@ rm $OUTPUT || true # We are expecting the command to fail so must turn off "set -e" INPUT=${data_dir}/bad.grib set +e -$PYTHON binary_message.py $INPUT $OUTPUT 2> $REDIRECT > $REDIRECT +$PYTHON binary_message.py $INPUT $OUTPUT status=$? set -e # Check command did indeed fail diff --git a/examples/python/bufr_attributes.sh b/examples/python/bufr_attributes.sh index 5b55f768a..ade65fc96 100755 --- a/examples/python/bufr_attributes.sh +++ b/examples/python/bufr_attributes.sh @@ -31,4 +31,5 @@ $PYTHON bufr_attributes.py 2> $REDIRECT > $fTmp #cat $fTmp #Clean up -rm -f $fTmp | true +rm -f $fTmp + diff --git a/examples/python/bufr_clone.sh b/examples/python/bufr_clone.sh index 00f593973..56b2681ee 100755 --- a/examples/python/bufr_clone.sh +++ b/examples/python/bufr_clone.sh @@ -39,6 +39,5 @@ fi set -e #Clean up -rm -f ${fBufrTmp} | true - +rm -f ${fBufrTmp} diff --git a/examples/python/bufr_expanded.sh b/examples/python/bufr_expanded.sh index 60144e566..af2bc7492 100755 --- a/examples/python/bufr_expanded.sh +++ b/examples/python/bufr_expanded.sh @@ -39,3 +39,4 @@ $PYTHON bufr_expanded.py >$fTmp 2> $REDIRECT #Clean up rm -f ${fTmp} + diff --git a/examples/python/bufr_get_keys.sh b/examples/python/bufr_get_keys.sh index f5bfa68d6..57bcfb36e 100755 --- a/examples/python/bufr_get_keys.sh +++ b/examples/python/bufr_get_keys.sh @@ -31,4 +31,5 @@ $PYTHON bufr_get_keys.py 2> $REDIRECT > $fTmp #cat $fTmp #Clean up -rm -f $fTmp | true +rm -f $fTmp + diff --git a/examples/python/bufr_keys_iterator.sh b/examples/python/bufr_keys_iterator.sh index 70dff716b..f743e974d 100755 --- a/examples/python/bufr_keys_iterator.sh +++ b/examples/python/bufr_keys_iterator.sh @@ -30,4 +30,5 @@ $PYTHON bufr_keys_iterator.py 2> $REDIRECT > $fTmp #cat $fTmp #Clean up -rm -f $fTmp | true +rm -f $fTmp + diff --git a/examples/python/bufr_read_header.sh b/examples/python/bufr_read_header.sh index 9f0a92e8a..457c36133 100755 --- a/examples/python/bufr_read_header.sh +++ b/examples/python/bufr_read_header.sh @@ -17,7 +17,7 @@ REDIRECT=/dev/null $PYTHON bufr_read_header.py 2> $REDIRECT > $fRes #We compare output to the reference by ignoring the whitespaces -diff -w $fRef $fRes >$REDIRECT 2> $REDIRECT +diff -w $fRef $fRes #cat $fRes diff --git a/examples/python/bufr_read_scatterometer.sh b/examples/python/bufr_read_scatterometer.sh index cc0d22241..f23f7306c 100755 --- a/examples/python/bufr_read_scatterometer.sh +++ b/examples/python/bufr_read_scatterometer.sh @@ -31,4 +31,5 @@ $PYTHON bufr_read_scatterometer.py 2> $REDIRECT > $fTmp #cat $fTmp #Clean up -rm -f $fTmp | true +rm -f $fTmp + diff --git a/examples/python/bufr_read_synop.sh b/examples/python/bufr_read_synop.sh index 8190f6e39..704ee3ec9 100755 --- a/examples/python/bufr_read_synop.sh +++ b/examples/python/bufr_read_synop.sh @@ -31,4 +31,5 @@ $PYTHON bufr_read_synop.py 2> $REDIRECT > $fTmp #cat $fTmp #Clean up -rm -f $fTmp | true +rm -f $fTmp + diff --git a/examples/python/bufr_read_temp.sh b/examples/python/bufr_read_temp.sh index 6bb18aab1..3515f1a49 100755 --- a/examples/python/bufr_read_temp.sh +++ b/examples/python/bufr_read_temp.sh @@ -31,4 +31,5 @@ $PYTHON bufr_read_temp.py 2> $REDIRECT > $fTmp #cat $fTmp #Clean up -rm -f $fTmp | true +rm -f $fTmp + diff --git a/examples/python/bufr_read_tropical_cyclone.sh b/examples/python/bufr_read_tropical_cyclone.sh index 6a5d6a7a5..69d8c60e2 100755 --- a/examples/python/bufr_read_tropical_cyclone.sh +++ b/examples/python/bufr_read_tropical_cyclone.sh @@ -32,4 +32,5 @@ $PYTHON bufr_read_tropical_cyclone.py #cat $fTmp #Clean up -rm -f $fTmp | true +rm -f $fTmp + diff --git a/examples/python/bufr_set_keys.sh b/examples/python/bufr_set_keys.sh index 376aa77ff..33e1d9d52 100755 --- a/examples/python/bufr_set_keys.sh +++ b/examples/python/bufr_set_keys.sh @@ -28,7 +28,7 @@ $PYTHON bufr_set_keys.py 2> $REDIRECT > $REDIRECT #Compare modified to the original set +e -${tools_dir}/bufr_compare $f $fBufrTmp >$REDIRECT 2> $REDIRECT +${tools_dir}/bufr_compare $f $fBufrTmp #Check if modified is different if [ $? -eq 0 ]; then @@ -42,5 +42,5 @@ set -e [ `${tools_dir}bufr_count $f` -eq `${tools_dir}/bufr_count ${fBufrTmp}` ] #Clean up -rm -f $fBufrTmp | true +rm -f $fBufrTmp diff --git a/tests/bufr_compare.sh b/tests/bufr_compare.sh index ecb24c11d..a8ebb4399 100755 --- a/tests/bufr_compare.sh +++ b/tests/bufr_compare.sh @@ -104,7 +104,7 @@ ${tools_dir}/bufr_compare -r ${fBufrInput1} ${fBufrInput2}>> $fLog #---------------------------------------------------- ${tools_dir}bufr_set -s subCentre=12 aaen_55.bufr $fBufrTmp set +e -${tools_dir}bufr_compare aaen_55.bufr $fBufrTmp >/dev/null +${tools_dir}bufr_compare aaen_55.bufr $fBufrTmp status=$? set -e [ $status -eq 1 ] diff --git a/tests/bufr_dump.sh b/tests/bufr_dump.sh index d05f5f27e..f316b581a 100755 --- a/tests/bufr_dump.sh +++ b/tests/bufr_dump.sh @@ -30,7 +30,7 @@ REDIRECT=/dev/null for file in ${bufr_files} do - ${tools_dir}bufr_dump -O ${data_dir}/bufr/$file 2> $REDIRECT > $REDIRECT + ${tools_dir}bufr_dump -O ${data_dir}/bufr/$file done #============================================== @@ -46,7 +46,7 @@ fJsonRef=${data_dir}/bufr/"bad.bufr.json.ref" ${tools_dir}bufr_dump -js $fBufr > $fJsonTmp -diff $fJsonTmp $fJsonRef >$REDIRECT 2> $REDIRECT +diff $fJsonTmp $fJsonRef #============================================== # Testing change of scale (see ECC-111) @@ -61,7 +61,7 @@ fJsonRef=${data_dir}/bufr/"207003.bufr.json.ref" ${tools_dir}bufr_dump -ja $fBufr > $fJsonTmp -diff $fJsonTmp $fJsonRef >$REDIRECT 2> $REDIRECT +diff $fJsonTmp $fJsonRef #Clean up rm -f $fLog diff --git a/tests/bufr_get.sh b/tests/bufr_get.sh index 133f07e74..b24f8169c 100755 --- a/tests/bufr_get.sh +++ b/tests/bufr_get.sh @@ -38,7 +38,6 @@ f="aaen_55.bufr" #The reference is the same as for ls ref_get=$f".ls.ref" -REDIRECT=/dev/null echo "Test: -p switch" >> $fLog echo "file: $f" >> $fLog @@ -46,7 +45,7 @@ ${tools_dir}/bufr_get -p totalLength,bufrHeaderCentre,bufrHeaderSubCentre,master #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 >$REDIRECT 2> $REDIRECT +diff $ref_get $res_get #Clean up rm -f $fLog diff --git a/tests/bufr_ls.sh b/tests/bufr_ls.sh index 6b3a7c7a2..9a1bb7d14 100755 --- a/tests/bufr_ls.sh +++ b/tests/bufr_ls.sh @@ -46,7 +46,7 @@ ${tools_dir}/bufr_ls -p totalLength,bufrHeaderCentre,bufrHeaderSubCentre,masterT #Write the values into a file and compare with ref awk NR==3 $fTmp | awk '{split($0,a," "); for (i=1; i<=8; i++) print a[i]}' > $res_ls -diff $ref_ls $res_ls >$REDIRECT 2> $REDIRECT +diff $ref_ls $res_ls rm -f $fLog $res_ls rm -f $fTmp diff --git a/tests/bufrdc_desc_ref.sh b/tests/bufrdc_desc_ref.sh index 4c72dec63..f7b79f34d 100755 --- a/tests/bufrdc_desc_ref.sh +++ b/tests/bufrdc_desc_ref.sh @@ -20,7 +20,6 @@ bufr_files=`cat ${data_dir}/bufr/bufr_data_files.txt` for bf in ${bufr_files} do file=${data_dir}/bufr/$bf - REDIRECT=/dev/null # Test descriptors: compare output of filter (res) with reference file (ref) res_desc=$file.desc.test