aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2011-06-23 23:10:00 +0200
committerDaniel Stenberg <daniel@haxx.se>2011-06-23 23:10:00 +0200
commit0215f7cb4dd04853f3ec193a82b79cc8b696a301 (patch)
tree360d80de05e3aeca5ae07200f9c6b29450c0b7f2
parent67f28662e1dbb3cf65e5eb5d920fc9a2cc64bb26 (diff)
runtests.pl: warn if a test is explicitly disabled
Just to make sure a user is aware of it.
-rwxr-xr-xtests/runtests.pl33
1 files changed, 20 insertions, 13 deletions
diff --git a/tests/runtests.pl b/tests/runtests.pl
index 806ee986d..a498963d0 100755
--- a/tests/runtests.pl
+++ b/tests/runtests.pl
@@ -226,6 +226,7 @@ my %skipped; # skipped{reason}=counter, reasons for skip
my @teststat; # teststat[testnum]=reason, reasons for skip
my %disabled_keywords; # key words of tests to skip
my %enabled_keywords; # key words of tests to run
+my %disabled; # disabled test cases
my $sshdid; # for socks server, ssh daemon version id
my $sshdvernum; # for socks server, ssh daemon version number
@@ -2437,6 +2438,9 @@ sub singletest {
if($disttests !~ /test$testnum\W/ ) {
logmsg "Warning: test$testnum not present in tests/data/Makefile.am\n";
}
+ if($disabled{$testnum}) {
+ logmsg "Warning: test$testnum is explicitly disabled\n";
+ }
# load the test case file definition
if(loadtest("${TESTDIR}/test${testnum}")) {
@@ -3861,7 +3865,6 @@ sub runtimestats {
my $number=0;
my $fromnum=-1;
my @testthis;
-my %disabled;
while(@ARGV) {
if ($ARGV[0] eq "-v") {
# verbose output
@@ -4116,6 +4119,22 @@ if(!$listonly) {
}
#######################################################################
+# Fetch all disabled tests
+#
+
+open(D, "<$TESTDIR/DISABLED");
+while(<D>) {
+ if(/^ *\#/) {
+ # allow comments
+ next;
+ }
+ if($_ =~ /(\d+)/) {
+ $disabled{$1}=$1; # disable this test number
+ }
+}
+close(D);
+
+#######################################################################
# If 'all' tests are requested, find out all test numbers
#
@@ -4125,18 +4144,6 @@ if ( $TESTCASES eq "all") {
my @cmds = grep { /^test([0-9]+)$/ && -f "$TESTDIR/$_" } readdir(DIR);
closedir(DIR);
- open(D, "<$TESTDIR/DISABLED");
- while(<D>) {
- if(/^ *\#/) {
- # allow comments
- next;
- }
- if($_ =~ /(\d+)/) {
- $disabled{$1}=$1; # disable this test number
- }
- }
- close(D);
-
$TESTCASES=""; # start with no test cases
# cut off everything but the digits