.\" * | (__| |_| | _ <| |___
.\" * \___|\___/|_| \_\_____|
.\" *
-.\" * Copyright (C) 1998 - 2005, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2007, Daniel Stenberg, <daniel@haxx.se>, et al.
.\" *
.\" * This software is licensed as described in the file COPYING, which
.\" * you should have received as part of this distribution. The terms
.\" * $Id$
.\" **************************************************************************
.\"
-.TH runtests.pl 1 "17 Mar 2005" "Curl 7.13.2" "runtests"
+.TH runtests.pl 1 "11 Oct 2007" "Curl 7.17.1" "runtests"
.SH NAME
runtests.pl \- run one or more test cases
.SH SYNOPSIS
If no test case number is given, all existing tests that the script can find
will be considered for running. You can specify single test cases to run,
space-separated, like "1 3 5 7 11", and you can specify a range like "45 to
-67".
+67". You can also specify only the tests you don't want to run by listing
+the numbers with a leading exclamation point, like "!66".
+.P
+It is also possible to specify tests to skip based on a key word describing
+the test. These are specified with a leading exclamation point and the
+key word or phrase, like "!HTTP NTLM auth".
.SH OPTIONS
.IP "-a"
Continue running the rest of the test cases even if one test fails. By
default, the test script stops as soon as an error is detected.
+.IP "-bN"
+Use N as the base TCP/UDP port number on which to start the test servers.
.IP "-c <curl>"
Provide a custom curl binary to run the tests with. Default is the curl
executable in the build tree.
.SH "RUNNING TESTS"
Many tests have conditions that must be met before the test case can run
fine. They could depend on built-in features in libcurl or features present in
-the operating system or even in 3rd party libraries that curl may or may not
+the operating system or even in third-party libraries that curl may or may not
use.
The test script checks this by itself, why it is safe to attempt to run all
my $skipped=0; # number of tests skipped; reported in main loop
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
#######################################################################
# variables the command line options may set
$why = serverfortest($testnum);
}
+ if(!$why) {
+ my @keywords = getpart("info", "keywords");
+ my $k;
+ for $k (@keywords) {
+ chomp $k;
+ if ($disabled_keywords{$k}) {
+ $why = "disabled by keyword";
+ }
+ }
+ }
+
if(!$why) {
my @precheck = getpart("client", "precheck");
$cmd = $precheck[0];
}
}
- if($why) {
+ if($why && !$listonly) {
# there's a problem, count it as "skipped"
$skipped++;
$skipped{$why}++;
sub serverfortest {
my ($testnum)=@_;
- # load the test case file definition
- if(loadtest("${TESTDIR}/test${testnum}")) {
- if($verbose) {
- # this is not a test
- logmsg "$testnum doesn't look like a test case\n";
- }
- return "no test";
- }
-
my @what = getpart("client", "server");
if(!$what[0]) {
my $fromnum=-1;
my @testthis;
my %disabled;
-do {
+while(@ARGV) {
if ($ARGV[0] eq "-v") {
# verbose output
$verbose=1;
-v verbose output
[num] like "5 6 9" or " 5 to 22 " to run those tests only
[!num] like "!5 !6 !9" to disable those tests
+ [!keyword] like "!cookies !IPv6" to disable tests with those key words
EOHELP
;
exit;
$fromnum = -1;
$disabled{$1}=$1;
}
-} while(shift @ARGV);
+ elsif($ARGV[0] =~ /^!(.+)/) {
+ $disabled_keywords{$1}=$1;
+ }
+ else {
+ print "Unknown option: $ARGV[0]\n";
+ exit;
+ }
+ shift @ARGV;
+}
if($testthis[0] ne "") {
$TESTCASES=join(" ", @testthis);