Commit 0215f7cb authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

runtests.pl: warn if a test is explicitly disabled

Just to make sure a user is aware of it.
parent 67f28662
Loading
Loading
Loading
Loading
+20 −13
Original line number Diff line number Diff line
@@ -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,15 +4119,9 @@ if(!$listonly) {
}

#######################################################################
# If 'all' tests are requested, find out all test numbers
# Fetch all disabled tests
#

if ( $TESTCASES eq "all") {
    # Get all commands and find out their test numbers
    opendir(DIR, $TESTDIR) || die "can't opendir $TESTDIR: $!";
    my @cmds = grep { /^test([0-9]+)$/ && -f "$TESTDIR/$_" } readdir(DIR);
    closedir(DIR);

open(D, "<$TESTDIR/DISABLED");
while(<D>) {
    if(/^ *\#/) {
@@ -4137,6 +4134,16 @@ if ( $TESTCASES eq "all") {
}
close(D);

#######################################################################
# If 'all' tests are requested, find out all test numbers
#

if ( $TESTCASES eq "all") {
    # Get all commands and find out their test numbers
    opendir(DIR, $TESTDIR) || die "can't opendir $TESTDIR: $!";
    my @cmds = grep { /^test([0-9]+)$/ && -f "$TESTDIR/$_" } readdir(DIR);
    closedir(DIR);

    $TESTCASES=""; # start with no test cases

    # cut off everything but the digits