aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/README9
-rwxr-xr-xtests/runtests.pl14
2 files changed, 15 insertions, 8 deletions
diff --git a/tests/README b/tests/README
index c9523a382..56ebab952 100644
--- a/tests/README
+++ b/tests/README
@@ -34,14 +34,15 @@ Run:
variables of that script in case you have some specific needs.
The script breaks on the first test that doesn't do OK. Use -a to prevent
- the script to abort on the first error. Run the script with -v for more
+ the script from abort on the first error. Run the script with -v for more
verbose output. Use -d to run the test servers with debug output enabled as
- well.
+ well. Specifying -k keeps all the log files generated by the test intact.
Use -s for shorter output, or pass test numbers to run specific tests only
(like "./runtests.pl 3 4" to test 3 and 4 only). It also supports test case
- ranges with 'to'. As in "./runtests 3 to 9" which runs the seven tests from
- 3 to 9.
+ ranges with 'to', as in "./runtests 3 to 9" which runs the seven tests from
+ 3 to 9. Any test numbers starting with ! are disabled, as are any test
+ numbers found in the file data/DISABLED (one per line).
Memory:
The test script will check that all allocated memory is freed properly IF
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