Changelog
+Dan F (25 April 2007)
+- Added support in runtests.pl for "!n" test numbers to disable individual
+ tests. Changed -t to only keep log files around when -k is specified,
+ to have the same behaviour as without -t.
+
Daniel S (25 April 2007)
- Sonia Subramanian brought our attention to a problem that happens if you set
the CURLOPT_RESUME_FROM or CURLOPT_RANGE options and an existing connection
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
my $number=0;
my $fromnum=-1;
my @testthis;
+my %disabled;
do {
if ($ARGV[0] eq "-v") {
# verbose output
-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;
elsif($ARGV[0] =~ /^to$/i) {
$fromnum = $number+1;
}
+ elsif($ARGV[0] =~ /^!(\d+)/) {
+ $fromnum = -1;
+ $disabled{$1}=$1;
+ }
} while(shift @ARGV);
if($testthis[0] ne "") {
my @cmds = grep { /^test([0-9]+)$/ && -f "$TESTDIR/$_" } readdir(DIR);
closedir DIR;
- my %dis;
open(D, "$TESTDIR/DISABLED");
while(<D>) {
if(/^ *\#/) {
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
}
# 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