summaryrefslogtreecommitdiff
path: root/lib/sbin
diff options
context:
space:
mode:
authorallen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac>1999-09-25 10:29:35 +0000
committerallen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac>1999-09-25 10:29:35 +0000
commit6074a8471f2865366cae1e043cfd4808f2f62e60 (patch)
tree452318f231e746a70f7e4182e0c1e264fb9867f0 /lib/sbin
parent98ff38daf3823fa4e66e75623947c18e0a563507 (diff)
More messages at the end of runtest ... tells you which thorns were
tested and if a run failed which thorn it was in git-svn-id: http://svn.cactuscode.org/flesh/trunk@991 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib/sbin')
-rw-r--r--lib/sbin/Runtest.pl48
1 files changed, 36 insertions, 12 deletions
diff --git a/lib/sbin/Runtest.pl b/lib/sbin/Runtest.pl
index be98ee12..e18088a3 100644
--- a/lib/sbin/Runtest.pl
+++ b/lib/sbin/Runtest.pl
@@ -73,8 +73,10 @@ else
while (<AT>)
{
@t = split(' ');
- foreach $T (@t) {
- if (-d "arrangements${sep}$T${sep}test")
+ foreach $T (@t)
+ {
+ $number = 0;
+ if (-e "arrangements${sep}$T${sep}test${sep}")
{
$thisdir = `pwd`;
chop($thisdir);
@@ -83,9 +85,11 @@ else
{
@testfiles = (@testfiles, $file);
@testthorns = (@testthorns, $T);
+ $number++;
}
chdir "$thisdir";
}
+ @ntests{"$T"} = $number;
}
}
}
@@ -99,7 +103,7 @@ foreach $t (@testfiles)
open (IN, "<$file") || die "Can not open $file";
while (<IN>)
{
- if (/^\s*\#\s*DESC(RIPTION)?\s*\"(.*)\"\s*$/i)
+ if (/^\s*\!\s*DESC(RIPTION)?\s*\"(.*)\"\s*$/i)
{
$testnames{$ntests} = $2
}
@@ -127,6 +131,16 @@ if ($tests =~ /All/) {
print "==================================================\n";
print "All tests run for configuration $config\n\n";
+ print "Tested: \n";
+ foreach $thorn (keys %ntests)
+ {
+ if ($ntests{"$thorn"} > 0)
+ {
+ print " $thorn [$ntests{\"$thorn\"}]\n";
+ }
+ }
+
+ print "\n";
print " Tests run -> $ntests\n";
print " Number passed -> $number_passed1\n";
if ($number_passed2 > 0)
@@ -140,7 +154,7 @@ if ($tests =~ /All/) {
print "\n Tests failed:\n";
for ($i=0; $i<$number_failed;$i++)
{
- print " ".@which_failed[$i]."\n";
+ print " ".@which_failed[$i]." (from $testthorns[$i])\n";
}
}
if ($number_zerofiles > 0)
@@ -158,31 +172,41 @@ else
$choice = test01;
$ntests = 0;
- foreach $t (@testfiles) {
+ foreach $t (@testfiles)
+ {
$ntests++;
$t =~ m:([^${sep}]+).par$:;
- $num = $1;
- $inp{$num} = $t;
- $testnum{$ntests} = $num;
+ $num = $1;
+ $inp{$num} = $t;
+ $testnum{$ntests} = $num;
}
- while (!($choice =~ /^q/i) ) {
+ while (!($choice =~ /^q/i) )
+ {
print "\n--- Menu ---\n";
$sp = " ";
for ($i=1;$i<$ntests+1;$i++) {
- print "[$i] ".@testthorns[$i-1]." $testnum{$i}: \n \"$testnames{$i}\"\n";
+ print "[$i] ".@testthorns[$i-1]." $testnum{$i}: \n \"$testnames{$i}\"\n";
}
print "\n Enter number of test to run (quit to end) : ";
- $choice = <STDIN>;
+ $choice = <STDIN>;
$choice =~ s/\n//;
$choice =~ s/\s//;
print "\n";
$ip = $inp{$testnum{$choice}};
$thorn = @testthorns[$choice-1];
- if (!($choice =~ m/quit/i))
+ if (!($choice =~ m/^q/i || $choice =~ m/^\s*$/))
{
&runtest($ip,$thorn,$choice);
}
+ if (!($choice =~ m/^q/i))
+ {
+ print " Hit return to continue ";
+ $continue = <STDIN>;
+ }
}
+
+ print "\n";
+
}
sub runtest {