summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2018-10-02 09:08:56 +0200
committerDaniel Stenberg <daniel@haxx.se>2018-10-02 13:07:06 +0200
commit5cc51b0d0f15b6817a82ac0e8fb7b9dece31f977 (patch)
treed7a0b431b095c5c8a46646ba5d938f468f9c6755 /tests
parentd9a2dc9aad055c12103f668194790c2beab661e9 (diff)
downloadcurl-5cc51b0d0f15b6817a82ac0e8fb7b9dece31f977.tar.gz
runtests: ignore disabled even when ranges are given
runtests.pl support running a range of tests, like "44 to 127". Starting now, the code makes sure that even such given ranges will ignore tests that are marked as disabled. Disabled tests can still be run by explictly specifying that test number. Closes #3075
Diffstat (limited to 'tests')
-rwxr-xr-xtests/runtests.pl25
1 files changed, 17 insertions, 8 deletions
diff --git a/tests/runtests.pl b/tests/runtests.pl
index 7258fdf31..b83dc4646 100755
--- a/tests/runtests.pl
+++ b/tests/runtests.pl
@@ -5215,6 +5215,12 @@ sub runtimestats {
logmsg "\n";
}
+# globally disabled tests
+disabledtests("$TESTDIR/DISABLED");
+
+# locally disabled tests, ignored by git etc
+disabledtests("$TESTDIR/DISABLED.local");
+
#######################################################################
# Check options to this test program
#
@@ -5369,8 +5375,17 @@ EOHELP
elsif($ARGV[0] =~ /^(\d+)/) {
$number = $1;
if($fromnum >= 0) {
- for($fromnum .. $number) {
- push @testthis, $_;
+ 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;
+ }
}
$fromnum = -1;
}
@@ -5528,12 +5543,6 @@ sub disabledtests {
}
}
-# globally disabled tests
-disabledtests("$TESTDIR/DISABLED");
-
-# locally disabled tests, ignored by git etc
-disabledtests("$TESTDIR/DISABLED.local");
-
#######################################################################
# If 'all' tests are requested, find out all test numbers
#