diff options
author | tradke <tradke@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2001-08-07 21:02:47 +0000 |
---|---|---|
committer | tradke <tradke@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2001-08-07 21:02:47 +0000 |
commit | 1f5678b98561968d7b00b82501808becb2fa437d (patch) | |
tree | 06f3e1d99d67898e3ad3db66d25573b7cd61eca3 /lib | |
parent | 5f6a9a6ca8fb6111ebc0ff84d4dd761333c4f748 (diff) |
Fixed the regex when searching for *.par files.
This closes PR Cactus-741.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2300 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib')
-rw-r--r-- | lib/sbin/Runtest.pl | 116 |
1 files changed, 58 insertions, 58 deletions
diff --git a/lib/sbin/Runtest.pl b/lib/sbin/Runtest.pl index 8e8e95e4..996f6bcd 100644 --- a/lib/sbin/Runtest.pl +++ b/lib/sbin/Runtest.pl @@ -338,7 +338,7 @@ else $ntests = 0; foreach $t (@testfiles) { - $t =~ m:([^${sep}]+).par$:; + $t =~ m:([^${sep}]+)\.par$:; $num = $1; $inp{$num} = $t; $testnum[$ntests] = $num; @@ -406,7 +406,7 @@ sub runtest $tp = $inpf; $tp =~ s:^.*$sep::; - $tp =~ s/.par//; + $tp =~ s/\.par$//; $test_base_dir = $inpf; $test_base_dir =~ s:[^${sep}]*$::; @@ -463,7 +463,7 @@ sub runtest } $indir = $inpf; - $indir =~ s:.par:${sep}:g; + $indir =~ s:\.par$:${sep}:g; @oldout = <$indir${sep}*.*l>; $blewit = 0; $reallyblewit = 0; @@ -488,67 +488,67 @@ sub runtest $nrealblow = 0; while ($oline = <INORIG>) { - $nline = <INNEW>; - # Now lets see if they differ. - if (!($nline eq $oline)) - { - - # Check against nans - if ($nline =~ /nan/i) - { - print "****CAUGHT NAN in $newfile****\n"; - $nblow ++; - $nrealblow ++; - } - # Check against inf - elsif ($nline =~ /inf/i) - { - print "****CAUGHT INF in $newfile****\n"; - $nblow ++; - $nrealblow ++; - } - else - { - # This is the new comparison (subtract last two numbers) - ($t1,$v1) = split(' ', $nline); - ($t2,$v2) = split(' ', $oline); - # Make sure that floating point numbers have 'e' if exponential. - $v1 =~ s/[dD]/e/; - $v2 =~ s/[dD]/e/; - - $vdiff = abs($v1 - $v2); - if ($vdiff > 0) - { - - # They diff. But do they differ strongly? - $nblow ++; - - $exp = sprintf("%e",$vdiff); - $exp =~ s/^.*e-(\d+)/$1/; - unless ($exp >= $tolerance) - { - $nrealblow++; - } - } - } - } # if + $nline = <INNEW>; + # Now lets see if they differ. + if (!($nline eq $oline)) + { + + # Check against nans + if ($nline =~ /nan/i) + { + print "****CAUGHT NAN in $newfile****\n"; + $nblow ++; + $nrealblow ++; + } + # Check against inf + elsif ($nline =~ /inf/i) + { + print "****CAUGHT INF in $newfile****\n"; + $nblow ++; + $nrealblow ++; + } + else + { + # This is the new comparison (subtract last two numbers) + ($t1,$v1) = split(' ', $nline); + ($t2,$v2) = split(' ', $oline); + # Make sure that floating point numbers have 'e' if exponential. + $v1 =~ s/[dD]/e/; + $v2 =~ s/[dD]/e/; + + $vdiff = abs($v1 - $v2); + if ($vdiff > 0) + { + + # They diff. But do they differ strongly? + $nblow ++; + + $exp = sprintf("%e",$vdiff); + $exp =~ s/^.*e-(\d+)/$1/; + unless ($exp >= $tolerance) + { + $nrealblow++; + } + } + } + } # if } #while if ($nblow != 0) { - $blewit ++; - $stripfile = $newfile; - $stripfile =~ s:^.*${sep}(.*)$:$1:; + $blewit ++; + $stripfile = $newfile; + $stripfile =~ s:^.*${sep}(.*)$:$1:; if ($nrealblow == 0) { - print " $stripfile differs at machine precision (which is OK!)\n"; - } + print " $stripfile differs at machine precision (which is OK!)\n"; + } else - { - $reallyblewit ++; - print "Substantial differences detected in $stripfile\n"; - print " $newfile $file\n"; - print " Differ on $nblow lines!\n"; - } + { + $reallyblewit ++; + print "Substantial differences detected in $stripfile\n"; + print " $newfile $file\n"; + print " Differ on $nblow lines!\n"; + } } } else |