From: Daniel Stenberg Date: Wed, 19 Mar 2014 22:28:28 +0000 (+0100) Subject: runtests.pl: verify specified test cases X-Git-Tag: curl-7_36_0~12 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2fc31dcf74bd0b1a5999a144664f957b7f8745e7;p=thirdparty%2Fcurl.git 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. --- diff --git a/tests/runtests.pl b/tests/runtests.pl index cbd40e7d96..e9f5b9ab46 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