runtests.pl: verify specified test cases

To better allow arguments like "1 to 9999" without flooding the terminal
with error messages, the given test cases range is now checked and only
test numbers with existing files are actually run.
This commit is contained in:
Daniel Stenberg 2014-03-19 23:28:28 +01:00
parent 715125e790
commit 2fc31dcf74
1 changed files with 13 additions and 0 deletions

View File

@ -4901,6 +4901,19 @@ if ( $TESTCASES eq "all") {
$TESTCASES .= " $n";
}
}
else {
my $verified="";
map {
if (-e "$TESTDIR/test$_") {
$verified.="$_ ";
}
} split(" ", $TESTCASES);
if($verified eq "") {
print "No existing test cases were specified\n";
exit;
}
$TESTCASES = $verified;
}
#######################################################################
# Start the command line log