mirror of
https://github.com/moparisthebest/curl
synced 2024-12-23 16:48:49 -05:00
runtests: skip disabled tests unless -f is used
To make it easier to write ranges like '115 to 229' without that explicitly enabling tests that are listed in DISABLED, this makes runtests always skip disabled tests unless the -f command line option is used. Previously the code attempted to not run such tests, but didn't do it correctly. Closes #7212
This commit is contained in:
parent
a3a298da5e
commit
76035e612a
@ -72,6 +72,8 @@ The exclusion types are \fkeyword\fP, \ftest\fP, and \ftool\fP.
|
||||
Run the test event-based (if possible). This will make runtests invoke curl
|
||||
with --test-event option. This option only works if both curl and libcurl were
|
||||
built debug-enabled.
|
||||
.IP "-f"
|
||||
Force the test to run even if mentioned in DISABLED.
|
||||
.IP "-g"
|
||||
Run the given test(s) with gdb. This is best used on a single test case and
|
||||
curl built --disable-shared. This then fires up gdb with command line set to
|
||||
|
@ -341,6 +341,7 @@ my $clearlocks; # force removal of files by killing locking processes
|
||||
my $listonly; # only list the tests
|
||||
my $postmortem; # display detailed info about failed tests
|
||||
my $run_event_based; # run curl with --test-event to test the event API
|
||||
my $run_disabeled; # run the specific tests even if listed in DISABLED
|
||||
|
||||
my %run; # running server
|
||||
my %doesntrun; # servers that don't work, identified by pidfile
|
||||
@ -3559,7 +3560,12 @@ sub singletest {
|
||||
logmsg "Warning: test$testnum not present in tests/data/Makefile.inc\n";
|
||||
}
|
||||
if($disabled{$testnum}) {
|
||||
logmsg "Warning: test$testnum is explicitly disabled\n";
|
||||
if(!$run_disabeled) {
|
||||
$why = "listed in DISABLED";
|
||||
}
|
||||
else {
|
||||
logmsg "Warning: test$testnum is explicitly disabled\n";
|
||||
}
|
||||
}
|
||||
if($ignored{$testnum}) {
|
||||
logmsg "Warning: test$testnum result is ignored\n";
|
||||
@ -5401,6 +5407,10 @@ while(@ARGV) {
|
||||
# run the tests cases event based if possible
|
||||
$run_event_based=1;
|
||||
}
|
||||
elsif($ARGV[0] eq "-f") {
|
||||
# force - run the test case even if listed in DISABLED
|
||||
$run_disabeled=1;
|
||||
}
|
||||
elsif($ARGV[0] eq "-E") {
|
||||
# load additional reasons to skip tests
|
||||
shift @ARGV;
|
||||
@ -5548,6 +5558,7 @@ Usage: runtests.pl [options] [test selection(s)]
|
||||
-d display server debug info
|
||||
-e event-based execution
|
||||
-E file load the specified file to exclude certain tests
|
||||
-f forcibly run even if disabled
|
||||
-g run the test case with gdb
|
||||
-gw run the test case with gdb as a windowed application
|
||||
-h this help text
|
||||
@ -5582,16 +5593,7 @@ EOHELP
|
||||
$number = $1;
|
||||
if($fromnum >= 0) {
|
||||
for my $n ($fromnum .. $number) {
|
||||
if($disabled{$n}) {
|
||||
# skip disabled test cases
|
||||
my $why = "configured as DISABLED";
|
||||
$skipped++;
|
||||
$skipped{$why}++;
|
||||
$teststat[$n]=$why; # store reason for this test case
|
||||
}
|
||||
else {
|
||||
push @testthis, $n;
|
||||
}
|
||||
push @testthis, $n;
|
||||
}
|
||||
$fromnum = -1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user