5 \___|\___/|_| \_\_____|
10 perl (and a unix-style shell)
13 'make test'. This invokes the 'runtests.pl' perl script. Edit the top
14 variables of that script in case you have some specific needs.
16 The script breaks on the first test that doesn't do OK. Use -a to prevent
17 the script to abort on the first error. Run the script with -v for more
18 verbose output. Use -d to run the test servers with debug output enabled as
21 Use -s fort shorter output, or pass a string with test numbers to run
22 specific tests only (like ./runtests.pl "3 4" to test 3 and 4 only)
25 The test script will check that all allocated memory is freed properly IF
26 curl has been built with the MALLOCDEBUG define set. The script will
27 automatically detect if that is the case, and it will use the ../memanalyze
28 script to analyze the memory debugging output.
31 If a test case fails, you can conveniently get the script to invoke the
32 debugger (gdb) for you with the server running and the exact same command
33 line parameters that failed. Just invoke 'runtests.pl <test number> -g' and
34 then just type 'run' in the debugger to perform the command through the
37 If a test case causes a core dump, analyze it by running gdb like:
39 # gdb ../curl/src core
41 ... and get a stack trace with the gdb command:
46 All logs are generated in the logs/ subdirctory (it is emtpied first
47 in the runtests.pl script)
50 All test-data are put in the data/ subdirctory.
52 For each tests there exist a few files, all with their own separate and
53 special purpose. Replace N with the test number:
55 nameN.txt: test description as displayed when run
57 commandN.txt: command line options for this test
59 protN.txt: the full dump of the protocol communication that curl is
60 expected to use when performing this test
62 replyN.txt: the full dump the server should reply to curl for this test.
63 If the final result that curl should've got is not in this
64 file, you can instead name the file replyN0001.txt. This
65 enables you to fiddle more. ;-) Alas, the server sends the
66 replyN.txt file but checks the result after the test against
69 stdoutN.txt: if this file is present, curl's stdout is compared against
70 this file to see that they're identical. If this is present,
71 curl will not be run with -o but instead all output is compared
74 errorN.txt: if this file is present, it should contain the error number
75 curl is supposed to return when this test is run.
77 uploadN.txt: if this file is present, it should contain the same data as
78 the log/upload.N does, after a curl upload has been performed.
80 ftpdN.txt: this file may contain instructions how to modify the behaviour
81 of the ftp server. It uses a simple syntax that is left to
86 * Make httpserver.pl work when we PUT without Content-Length:
87 * Add persistant connection support and test cases