From 19befd4474cbfc584bd82f82c36b64287ca28bfd Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Mon, 8 Dec 2014 16:38:33 +0000 Subject: [PATCH] Testing: fix number comparison for bufr tests --- tests/bufrdc_ref.sh | 4 ++-- tests/mybufrdc_ref.sh | 4 ++-- tests/number_compare.pl | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/bufrdc_ref.sh b/tests/bufrdc_ref.sh index c593bf3b8..06d1273af 100755 --- a/tests/bufrdc_ref.sh +++ b/tests/bufrdc_ref.sh @@ -31,8 +31,8 @@ do ${tools_dir}bufr_filter bufrdc_num_ref.filter $file 2> $REDIRECT > $res_num # Cannot use plain diff. We need to compare FLOAT NUMBERS with a tolerance - # perl number_compare.pl $ref_num $res_num >$REDIRECT 2> $REDIRECT - numdiff $ref_num $res_num >$REDIRECT 2> $REDIRECT + perl number_compare.pl $ref_num $res_num >$REDIRECT 2> $REDIRECT + #numdiff $ref_num $res_num >$REDIRECT 2> $REDIRECT done diff --git a/tests/mybufrdc_ref.sh b/tests/mybufrdc_ref.sh index 260765031..e13d0c361 100755 --- a/tests/mybufrdc_ref.sh +++ b/tests/mybufrdc_ref.sh @@ -35,8 +35,8 @@ do fi # Cannot use plain diff. We need to compare FLOAT NUMBERS with a tolerance - #perl number_compare.pl $ref_num $res_num >$REDIRECT 2> $REDIRECT - numdiff $ref_num $res_num > $diff_num 2> $diff_num + perl number_compare.pl $ref_num $res_num > $diff_num 2> $diff_num + #numdiff $ref_num $res_num > $diff_num 2> $diff_num if [ $? != 0 ] then mv $file $file.no diff --git a/tests/number_compare.pl b/tests/number_compare.pl index 04604dd0a..00b397db5 100755 --- a/tests/number_compare.pl +++ b/tests/number_compare.pl @@ -26,7 +26,7 @@ if (scalar @ARGV < 2) { &usage; } # Tolerance is optional -my $tolerance = 0.0000000000001; +my $tolerance = 1e-9; my $result = GetOptions ( "t=s" => \$tolerance );