2005-03-17 09:03:46 +01:00
|
|
|
.\" **************************************************************************
|
|
|
|
.\" * _ _ ____ _
|
|
|
|
.\" * Project ___| | | | _ \| |
|
|
|
|
.\" * / __| | | | |_) | |
|
|
|
|
.\" * | (__| |_| | _ <| |___
|
|
|
|
.\" * \___|\___/|_| \_\_____|
|
|
|
|
.\" *
|
2007-10-11 23:15:09 +02:00
|
|
|
.\" * Copyright (C) 1998 - 2007, Daniel Stenberg, <daniel@haxx.se>, et al.
|
2005-03-17 09:03:46 +01:00
|
|
|
.\" *
|
|
|
|
.\" * This software is licensed as described in the file COPYING, which
|
|
|
|
.\" * you should have received as part of this distribution. The terms
|
|
|
|
.\" * are also available at http://curl.haxx.se/docs/copyright.html.
|
|
|
|
.\" *
|
|
|
|
.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
|
|
|
.\" * copies of the Software, and permit persons to whom the Software is
|
|
|
|
.\" * furnished to do so, under the terms of the COPYING file.
|
|
|
|
.\" *
|
|
|
|
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
|
|
.\" * KIND, either express or implied.
|
|
|
|
.\" *
|
|
|
|
.\" * $Id$
|
|
|
|
.\" **************************************************************************
|
|
|
|
.\"
|
2007-10-11 23:15:09 +02:00
|
|
|
.TH runtests.pl 1 "11 Oct 2007" "Curl 7.17.1" "runtests"
|
2005-03-17 09:03:46 +01:00
|
|
|
.SH NAME
|
|
|
|
runtests.pl \- run one or more test cases
|
|
|
|
.SH SYNOPSIS
|
|
|
|
.B runtests.pl [options] [test number]
|
|
|
|
.SH DESCRIPTION
|
|
|
|
\fIruntests.pl\fP runs one, several or all the existing test cases in curl's
|
|
|
|
test suite. It is often called from the root Makefile of the curl package with
|
|
|
|
\&'make test'.
|
|
|
|
.SH "TEST NUMBER"
|
|
|
|
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
|
2007-10-11 23:15:09 +02:00
|
|
|
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".
|
2005-03-17 09:03:46 +01:00
|
|
|
.SH OPTIONS
|
2005-03-17 13:16:24 +01:00
|
|
|
.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.
|
2007-10-11 23:15:09 +02:00
|
|
|
.IP "-bN"
|
|
|
|
Use N as the base TCP/UDP port number on which to start the test servers.
|
2005-03-17 13:16:24 +01:00
|
|
|
.IP "-c <curl>"
|
|
|
|
Provide a custom curl binary to run the tests with. Default is the curl
|
|
|
|
executable in the build tree.
|
2005-03-17 09:03:46 +01:00
|
|
|
.IP "-d"
|
2005-03-17 13:16:24 +01:00
|
|
|
Enable protocol debug: have the servers display protocol output.
|
2005-03-17 09:03:46 +01:00
|
|
|
.IP "-g"
|
2005-03-17 13:16:24 +01:00
|
|
|
Run the given test(s) with gdb. This is best used on a single test case and
|
|
|
|
curl built --disable-shared. This then fires up gdb with command line set to
|
|
|
|
run the specified test case. Simply (set a break-point and) type 'run' to
|
|
|
|
start.
|
|
|
|
.IP "-h"
|
|
|
|
Displays a help text about this program's command line options.
|
|
|
|
.IP "-k"
|
|
|
|
Keep output and log files in log/ after a test run, even if no error was
|
|
|
|
detected. Useful for debugging.
|
|
|
|
.IP "-l"
|
|
|
|
Lists all test case names.
|
2005-03-17 09:03:46 +01:00
|
|
|
.IP "-n"
|
2005-03-17 13:16:24 +01:00
|
|
|
Disable the check for and use of valgrind.
|
2005-03-17 09:03:46 +01:00
|
|
|
.IP "-p"
|
2005-03-17 13:16:24 +01:00
|
|
|
Prints out all files in "log/" to stdout when a test case fails. Very
|
|
|
|
practical when used in the automated and distributed tests since then the
|
|
|
|
people checking the failures and the reasons for them might not have physical
|
|
|
|
access to the machine and logs.
|
|
|
|
.IP "-s"
|
|
|
|
Shorter output. Speaks less than default.
|
|
|
|
.IP "-t[num]"
|
|
|
|
Selects a \fBtorture\fP test for the given tests. This makes runtests.pl first
|
|
|
|
run the tests once and count the number of memory allocations made. It then
|
|
|
|
reruns the test that number of times, each time forcing one of the allocations
|
|
|
|
to fail until all allocs have been tested. By setting \fInum\fP you can force
|
|
|
|
the allocation with that number to be set to fail at once instead of looping
|
|
|
|
through everyone, which is very handy when debugging and then often in
|
2005-03-21 08:45:18 +01:00
|
|
|
combination with \fI-g\fP.
|
2005-03-17 13:16:24 +01:00
|
|
|
.IP "-v"
|
|
|
|
Enable verbose output. Speaks more than default.
|
2005-03-17 09:03:46 +01:00
|
|
|
.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
|
2007-10-11 23:15:09 +02:00
|
|
|
the operating system or even in third-party libraries that curl may or may not
|
2005-03-17 09:03:46 +01:00
|
|
|
use.
|
|
|
|
|
|
|
|
The test script checks this by itself, why it is safe to attempt to run all
|
2005-03-17 13:16:24 +01:00
|
|
|
tests. They who cannot be run due to failed requirements, will simply be
|
2005-03-17 09:03:46 +01:00
|
|
|
skipped and you'll get a report about it when all test cases have completed.
|
|
|
|
.SH "WRITING TESTS"
|
2005-03-17 13:16:24 +01:00
|
|
|
The simplest way to write test cases is to start with a similar existing test,
|
2005-03-17 09:03:46 +01:00
|
|
|
save it with a new number and then adjust it to fit. There's an attempt to
|
|
|
|
document the test case file format in the tests/FILEFORMAT.
|