diff options
author | Dan Fandrich <dan@coneharvesters.com> | 2007-04-25 23:18:52 +0000 |
---|---|---|
committer | Dan Fandrich <dan@coneharvesters.com> | 2007-04-25 23:18:52 +0000 |
commit | f213d0db98f8c882e072aedeb8e564ed408ae281 (patch) | |
tree | 4dbfa0d7fa5e6ef8ca7e4fe9a90008674f1876ca /tests/runtests.pl | |
parent | 6e835ef3aa2f9fe6497c7e00d4c8640ba64c5c53 (diff) |
Added support in runtests.pl for "!n" test numbers to disable individual tests.
Diffstat (limited to 'tests/runtests.pl')
-rwxr-xr-x | tests/runtests.pl | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/tests/runtests.pl b/tests/runtests.pl index b11438000..851de6f5a 100755 --- a/tests/runtests.pl +++ b/tests/runtests.pl @@ -2247,6 +2247,7 @@ sub serverfortest { my $number=0; my $fromnum=-1; my @testthis; +my %disabled; do { if ($ARGV[0] eq "-v") { # verbose output @@ -2321,6 +2322,7 @@ Usage: runtests.pl [options] -t torture -v verbose output [num] like "5 6 9" or " 5 to 22 " to run those tests only + ![num] like "!5 !6 !9" to disable those tests EOHELP ; exit; @@ -2340,6 +2342,10 @@ EOHELP elsif($ARGV[0] =~ /^to$/i) { $fromnum = $number+1; } + elsif($ARGV[0] =~ /^!(\d+)/) { + $fromnum = -1; + $disabled{$1}=$1; + } } while(shift @ARGV); if($testthis[0] ne "") { @@ -2406,7 +2412,6 @@ if ( $TESTCASES eq "all") { my @cmds = grep { /^test([0-9]+)$/ && -f "$TESTDIR/$_" } readdir(DIR); closedir DIR; - my %dis; open(D, "$TESTDIR/DISABLED"); while(<D>) { if(/^ *\#/) { @@ -2414,9 +2419,10 @@ if ( $TESTCASES eq "all") { next; } if($_ =~ /(\d+)/) { - $dis{$1}=$1; # disable this test number + $disabled{$1}=$1; # disable this test number } } + close(D); $TESTCASES=""; # start with no test cases @@ -2426,9 +2432,9 @@ if ( $TESTCASES eq "all") { } # the the numbers from low to high foreach my $n (sort { $a <=> $b } @cmds) { - if($dis{$n}) { + if($disabled{$n}) { # skip disabled test cases - my $why = "mentioned in DISABLED"; + my $why = "configured as DISABLED"; $skipped++; $skipped{$why}++; $teststat[$n]=$why; # store reason for this test case |