From 2fc31dcf74bd0b1a5999a144664f957b7f8745e7 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 19 Mar 2014 23:28:28 +0100 Subject: 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. --- tests/runtests.pl | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'tests') diff --git a/tests/runtests.pl b/tests/runtests.pl index cbd40e7d9..e9f5b9ab4 100755 --- a/tests/runtests.pl +++ b/tests/runtests.pl @@ -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 -- cgit v1.2.3