Testing: use bufr_filter instead of bufr_ls

This commit is contained in:
Shahram Najm 2020-08-29 12:30:03 +01:00
parent 36315f9891
commit 49ae510df2
1 changed files with 7 additions and 2 deletions

View File

@ -17,6 +17,7 @@
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
if test "x$ECCODES_TEST_WITH_VALGRIND" = "x"; then if test "x$ECCODES_TEST_WITH_VALGRIND" = "x"; then
echo "Environment variable ECCODES_TEST_WITH_VALGRIND not defined. Test disabled" echo "Environment variable ECCODES_TEST_WITH_VALGRIND not defined. Test disabled"
@ -30,10 +31,14 @@ tools_dir=$build_dir/bin
files=`cat ${data_dir}/bufr/bufr_data_files.txt` files=`cat ${data_dir}/bufr/bufr_data_files.txt`
VALGRIND_OPTIONS="--error-exitcode=1 --leak-check=full --log-file=$tempLog" VALGRIND_OPTIONS="--error-exitcode=1 --leak-check=full --log-file=$tempLog"
cat > $tempFilt <<EOF
set unpack=1;
EOF
# bufr_filter has a small leak to do with parsing and action files not related to BUFR decoding, # bufr_filter has a small leak to do with parsing and action files not related to BUFR decoding,
# So instead we use bufr_ls to do the unpacking # So instead we use bufr_ls to do the unpacking
for bf in $files; do for bf in $files; do
valgrind $VALGRIND_OPTIONS ${tools_dir}/bufr_ls -s unpack=1 ${data_dir}/bufr/$bf >/dev/null valgrind $VALGRIND_OPTIONS ${tools_dir}/codes_bufr_filter $tempFilt ${data_dir}/bufr/$bf >/dev/null
done done
@ -56,4 +61,4 @@ done
# Clean up # Clean up
rm -f $tempLog $tempSupp rm -f $tempLog $tempSupp $tempFilt