summaryrefslogtreecommitdiff
path: root/lib/sbin/RunTestUtils.pl
diff options
context:
space:
mode:
authorallen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac>2002-05-01 10:38:22 +0000
committerallen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac>2002-05-01 10:38:22 +0000
commite38b065cab5d8de6e5e65c11d3aee520c48247b5 (patch)
tree67aa8b0c75be56d951d96f5fdc0fb6b5e96d4d97 /lib/sbin/RunTestUtils.pl
parent576a8c2da33c9c37de9175a2061dfe7ca96e3612 (diff)
Added file extensions gauss, alm and ul
All file extensions will be added by testsuite configuration files soon, once another perl script is written. (thorns can either add global extensions for all tests, or local extensions just for their own thorn) Catch the case when the original file has a nan or an inf but the new file has a real number (this was caught but there was no message to tell you about the nans, and the reported differences were out by a lot :) ) git-svn-id: http://svn.cactuscode.org/flesh/trunk@2777 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib/sbin/RunTestUtils.pl')
-rw-r--r--lib/sbin/RunTestUtils.pl36
1 files changed, 29 insertions, 7 deletions
diff --git a/lib/sbin/RunTestUtils.pl b/lib/sbin/RunTestUtils.pl
index 7eec7e0c..5d1c1c92 100644
--- a/lib/sbin/RunTestUtils.pl
+++ b/lib/sbin/RunTestUtils.pl
@@ -376,7 +376,7 @@ sub RunCactus
printf "\n Issuing $command\n";
$retcode = 0;
- open (CMD, "$command |");
+ open (CMD, "pwd; $command |");
open (LOG, "> $testname.log");
while (<CMD>)
@@ -432,7 +432,7 @@ sub FindFiles
foreach $f (@tmp)
{
- if ($f =~ /(xl|yl|zl|dl|tl|gnuplot|asc)$/)
+ if ($f =~ /(xl|yl|zl|dl|tl|gnuplot|asc|gauss|alm|ul)$/)
{
$recognizedfiles .= " $f";
}
@@ -817,6 +817,8 @@ sub CompareTestFiles
$rundata->{"$inthorn $test $file NINF"}=0;
$rundata->{"$inthorn $test $file NNAN"}=0;
+ $rundata->{"$inthorn $test $file NINFNOTFOUND"}=0;
+ $rundata->{"$inthorn $test $file NNANNOTFOUND"}=0;
$rundata->{"$inthorn $test $file NFAILSTRONG"}=0;
$rundata->{"$inthorn $test $file NFAILWEAK"}=0;
@@ -838,9 +840,11 @@ sub CompareTestFiles
# Now lets see if they differ.
if (!("\U$nline" eq "\U$oline"))
{
+
# Check differences
- if ($nline !~ /(nan|inf)/i)
+ if (($nline !~ /(nan|inf)/i) && ($oline !~ /(nan|inf)/i))
{
+
# This is the new comparison (subtract last two numbers)
@newvals = split(' ',$nline);
@oldvals = split(' ',$oline);
@@ -913,19 +917,35 @@ sub CompareTestFiles
}
}
# Check against nans
- elsif ($nline =~ /nan/i)
+ elsif ($nline =~ /nan/i && $oline !~ /nan/i)
{
$rundata->{"$inthorn $test $file NNAN"}++;
$rundata->{"$inthorn $test $file NFAILWEAK"}++;
$rundata->{"$inthorn $test $file NFAILSTRONG"}++;
}
# Check against inf
- elsif ($nline =~ /inf/i)
+ elsif ($nline =~ /inf/i && $oline !~ /inf/i)
{
$rundata->{"$inthorn $test $file NINF"}++;
$rundata->{"$inthorn $test $file NFAILWEAK"}++;
$rundata->{"$inthorn $test $file NFAILSTRONG"}++;
}
+ elsif ($oline =~ /nan/i)
+ {
+ $rundata->{"$inthorn $test $file NNANNOTFOUND"}++;
+ $rundata->{"$inthorn $test $file NFAILWEAK"}++;
+ $rundata->{"$inthorn $test $file NFAILSTRONG"}++;
+ }
+ elsif ($oline =~ /inf/i)
+ {
+ $rundata->{"$inthorn $test $file NINFNOTFOUND"}++;
+ $rundata->{"$inthorn $test $file NFAILWEAK"}++;
+ $rundata->{"$inthorn $test $file NFAILSTRONG"}++;
+ }
+ else
+ {
+ print "TESTSUITE ERROR: Didn't catch case in CompareFiles\n";
+ }
} # if
} #while
@@ -1022,8 +1042,10 @@ sub ReportOnTest
{
$rundata->{"$thorn $test NFAILSTRONG"}++;
print "\n - $file: substantial differences!\n";
- print " caught $rundata->{\"$thorn $test $file NNAN\"} NaNs in $file\n" if $rundata->{"$thorn $test $file NNAN"};
- print " caught $rundata->{\"$thorn $test $file NINF\"} Infs in $file\n" if $rundata->{"$thorn $test $file NINF"};
+ print " caught $rundata->{\"$thorn $test $file NNAN\"} NaNs in new $file\n" if $rundata->{"$thorn $test $file NNAN"};
+ print " did not reproduce $rundata->{\"$thorn $test $file NNANNOTFOUND\"} NaNs from old $file\n" if $rundata->{"$thorn $test $file NNANNOTFOUND"};
+ print " caught $rundata->{\"$thorn $test $file NINF\"} Infs in new $file\n" if $rundata->{"$thorn $test $file NINF"};
+ print " did not reproduce $rundata->{\"$thorn $test $file NINFNOTFOUND\"} Infs from old $file\n" if $rundata->{"$thorn $test $file NINFNOTFOUND"};
print " significant differences on $rundata->{\"$thorn $test $file NFAILSTRONG\"} (out of $rundata->{\"$thorn $test $file NUMLINES\"}) lines!\n";
foreach $val (keys (%$rundata))
{