diff options
author | Daniel Stenberg <daniel@haxx.se> | 2021-06-08 17:28:59 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2021-06-08 23:35:37 +0200 |
commit | 76035e612a564530ad12205e37c3506d8778d9bd (patch) | |
tree | 2eced93c214226adaf3a90ede4ef698ff45631b2 /tests/runtests.pl | |
parent | a3a298da5ee5bdc2199a819aa2a20df9b4d6268e (diff) | |
download | curl-76035e612a564530ad12205e37c3506d8778d9bd.tar.gz |
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
Diffstat (limited to 'tests/runtests.pl')
-rwxr-xr-x | tests/runtests.pl | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/tests/runtests.pl b/tests/runtests.pl index ab77c0ab7..dd38ef4f1 100755 --- a/tests/runtests.pl +++ b/tests/runtests.pl @@ -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; } |