aboutsummaryrefslogtreecommitdiff
path: root/tests/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'tests/README.md')
-rw-r--r--tests/README.md81
1 files changed, 38 insertions, 43 deletions
diff --git a/tests/README.md b/tests/README.md
index 65af2a0bd..1464eacdc 100644
--- a/tests/README.md
+++ b/tests/README.md
@@ -8,6 +8,41 @@ SPDX-License-Identifier: curl
# Running
+ See the "Requires to run" section for prerequisites.
+
+ In the root of the curl repository:
+
+ ./configure && make && make test
+
+ To run a specific set of tests (e.g. 303 and 410):
+
+ make test TFLAGS="303 410"
+
+ To run the tests faster, pass the -j (parallelism) flag:
+
+ make test TFLAGS="-j10"
+
+ "make test" builds the test suite support code and invokes the 'runtests.pl'
+ perl script to run all the tests. The value of `TFLAGS` is passed
+ directly to 'runtests.pl'.
+
+ When you run tests via make, the flags `-a` and `-s` are passed, meaning
+ to continue running tests even after one fails, and to emit short output.
+
+ If you'd like to not use those flags, you can run 'runtests.pl' directly.
+ You must `chdir` into the tests directory, then you can run it like so:
+
+ ./runtests.pl 303 410
+
+ You must have run `make test` at least once first to build the support code.
+
+ To see what flags are available for runtests.pl, and what output it emits, run:
+
+ man ./tests/runtests.1
+
+ After a test fails, examine the tests/log directory for stdout, stderr, and
+ output from the servers used in the test.
+
## Requires to run
- perl (and a unix-style shell)
@@ -15,7 +50,7 @@ SPDX-License-Identifier: curl
- python-impacket (for SMB tests)
- diff (when a test fails, a diff is shown)
- stunnel (for HTTPS and FTPS tests)
- - OpenSSH or SunSSH (for SCP, SFTP and SOCKS4/5 tests)
+ - OpenSSH or SunSSH (for SCP and SFTP tests)
- nghttpx (for HTTP/2 and HTTP/3 tests)
- nroff (for --manual tests)
- An available `en_US.UTF-8` locale
@@ -59,9 +94,7 @@ SPDX-License-Identifier: curl
The test suite runs stand-alone servers on random ports to which it makes
requests. For SSL tests, it runs stunnel to handle encryption to the regular
- servers. For SSH, it runs a standard OpenSSH server. For SOCKS4/5 tests SSH
- is used to perform the SOCKS functionality and requires a SSH client and
- server.
+ servers. For SSH, it runs a standard OpenSSH server.
The listen port numbers for the test servers are picked randomly to allow
users to run multiple test cases concurrently and to not collide with other
@@ -75,47 +108,9 @@ SPDX-License-Identifier: curl
used, set the environment variable `NGHTTPX`. The default can also be
changed by specifying `--with-test-nghttpx=<path>` as argument to `configure`.
-### Run
-
- `./configure && make && make test`. This builds the test suite support code
- and invokes the 'runtests.pl' perl script to run all the tests. Edit the top
- variables of that script in case you have some specific needs, or run the
- script manually (after the support code has been built).
-
- The script breaks on the first test that doesn't do OK. Use `-a` to prevent
- the script from aborting on the first error. Run the script with `-v` for
- more verbose output. Use `-d` to run the test servers with debug output
- enabled as well. Specifying `-k` keeps all the log files generated by the
- test intact.
-
- Use `-s` for shorter output, or pass test numbers to run specific tests only
- (like `./runtests.pl 3 4` to test 3 and 4 only). It also supports test case
- ranges with 'to', as in `./runtests.pl 3 to 9` which runs the seven tests
- from 3 to 9. Any test numbers starting with ! are disabled, as are any test
- numbers found in the files `data/DISABLED` or `data/DISABLED.local` (one per
- line). The latter is meant for local temporary disables and will be ignored
- by git.
-
- Test cases mentioned in `DISABLED` can still be run if `-f` is provided.
-
- When `-s` is not present, each successful test will display on one line the
- test number and description and on the next line a set of flags, the test
- result, current test sequence, total number of tests to be run and an
- estimated amount of time to complete the test run. The flags consist of
- these letters describing what is checked in this test:
-
- s stdout
- d data
- u upload
- p protocol
- o output
- e exit code
- m memory
- v valgrind
-
### Shell startup scripts
- Tests which use the ssh test server, SCP/SFTP/SOCKS tests, might be badly
+ Tests which use the ssh test server, SCP/SFTP tests, might be badly
influenced by the output of system wide or user specific shell startup
scripts, .bashrc, .profile, /etc/csh.cshrc, .login, /etc/bashrc, etc. which
output text messages or escape sequences on user login. When these shell