diff options
author | allen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2002-04-27 10:25:44 +0000 |
---|---|---|
committer | allen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2002-04-27 10:25:44 +0000 |
commit | 1ca93beaaac1a9cd9be33b77d5c52c8cc5c9b64c (patch) | |
tree | eec376f10a2b200161b65f3168bf93586603387a /lib/sbin/RunTestUtils.pl | |
parent | c96a3e8fa13877bc5bc11b58ef1c8162e643f52e (diff) |
Fixed my dodgy matching of known datafile extensions, also now report
on which files aren't being tested (ignoring . .. CVS *.par *~)
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2760 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib/sbin/RunTestUtils.pl')
-rw-r--r-- | lib/sbin/RunTestUtils.pl | 53 |
1 files changed, 44 insertions, 9 deletions
diff --git a/lib/sbin/RunTestUtils.pl b/lib/sbin/RunTestUtils.pl index 3a794171..e1a70046 100644 --- a/lib/sbin/RunTestUtils.pl +++ b/lib/sbin/RunTestUtils.pl @@ -168,7 +168,7 @@ sub FindAllTests $filedir = $1; if (-d $filedir) { - $testdata->{"$thorn $filedir DATAFILES"} .= &FindFiles($filedir); + ($testdata->{"$thorn $filedir UNKNOWNFILES"},$testdata->{"$thorn $filedir DATAFILES"}) = &FindFiles($filedir); $testdata->{"$thorn $filedir NDATAFILES"} = scalar(split(" ",$testdata->{"$thorn $filedir DATAFILES"})); $testdata->{"$thorn TESTS"} .= "$filedir "; $testdata->{"$thorn NTESTS"}++; @@ -418,23 +418,31 @@ EOT sub FindFiles { my ($dir) = @_; - my ($files, @tmp); - - $files=""; + my ($unrecognizedfiles,$recognizedfiles, @tmp); + $recognizedfiles=""; + $unrecognizedfiles=""; + opendir (DIR, $dir); @tmp = readdir (DIR); closedir (DIR); foreach $f (@tmp) { - if ($f =~ /[xl|yl|zl|dl|tl|gnuplot|asc]$/) + if ($f =~ /(xl|yl|zl|dl|tl|gnuplot|asc)$/) + { + $recognizedfiles .= " $f"; + } + else { - $files .= " $f"; + if ($f !~ /^(\.|\.\.|.*\.par|CVS|.*~)$/) + { + $unrecognizedfiles .= " $f"; + } } } - - return $files; + + return ($unrecognizedfiles,$recognizedfiles); } sub PrintDataBase @@ -551,6 +559,33 @@ sub WriteFullResults print "$nottested\n\n"; } + $unknown = 0; + foreach $thorn (split(" ",$testdata->{"RUNNABLETHORNS"})) + { + if ($testdata->{"$thorn RUNNABLE"} !~ m:^\s*$:) + { + foreach $test (split(" ",$testdata->{"$thorn RUNNABLE"})) + { + $gotthorn = 0; + if ($testdata->{"$thorn $test UNKNOWNFILES"}) + { + if (!$unknown) + { + print " Thorns with unrecognized test output files:\n"; + $unknown = 1; + } + + if (!$gotthorn) + { + print " $thorn\n"; + $gotthorn = 1; + } + print " $test: $testdata->{\"$thorn $test UNKNOWNFILES\"}\n"; + } + } + } + } + print $separator2; print " Run details for configuration $config\n\n"; @@ -759,7 +794,7 @@ sub CompareTestFiles $test_dir = $testdata->{"$inthorn $test TESTOUTPUTDIR"}; # Add output files to database - $rundata->{"$inthorn $test TESTFILES"} = &FindFiles("$test_dir"); + ($rundata->{"$inthorn $test UNKNOWNFILES"},$rundata->{"$inthorn $test TESTFILES"}) = &FindFiles("$test_dir"); $rundata->{"$inthorn $test NFAILWEAK"}=0; $rundata->{"$inthorn $test NFAILSTRONG"}=0; |