README 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. _ _ ____ _
  2. ___| | | | _ \| |
  3. / __| | | | |_) | |
  4. | (__| |_| | _ <| |___
  5. \___|\___/|_| \_\_____|
  6. The cURL Test Suite
  7. Requires:
  8. perl (and a unix-style shell)
  9. diff (when a test fail, a diff is shown)
  10. stunnel (for HTTPS and FTPS tests)
  11. TCP ports used:
  12. - 8999 on localhost for HTTP tests
  13. - 8433 on localhost for HTTPS tests
  14. - 8921 on localhost for FTP tests
  15. - 8821 on localhost for FTPS tests (currently disabled)
  16. The test suite runs simple FTP and HTTP servers on these ports to which
  17. it makes requests.
  18. Run:
  19. 'make test'. This invokes the 'runtests.pl' perl script. Edit the top
  20. variables of that script in case you have some specific needs.
  21. The script breaks on the first test that doesn't do OK. Use -a to prevent
  22. the script to abort on the first error. Run the script with -v for more
  23. verbose output. Use -d to run the test servers with debug output enabled as
  24. well.
  25. Use -s for shorter output, or pass test numbers to run specific tests only
  26. (like "./runtests.pl 3 4" to test 3 and 4 only). It also supports test case
  27. ranges with 'to'. As in "./runtests 3 to 9" which runs the seven tests from
  28. 3 to 9.
  29. Memory:
  30. The test script will check that all allocated memory is freed properly IF
  31. curl has been built with the CURLDEBUG define set. The script will
  32. automatically detect if that is the case, and it will use the ../memanalyze
  33. script to analyze the memory debugging output.
  34. Debug:
  35. If a test case fails, you can conveniently get the script to invoke the
  36. debugger (gdb) for you with the server running and the exact same command
  37. line parameters that failed. Just invoke 'runtests.pl <test number> -g' and
  38. then just type 'run' in the debugger to perform the command through the
  39. debugger.
  40. If a test case causes a core dump, analyze it by running gdb like:
  41. # gdb ../curl/src core
  42. ... and get a stack trace with the gdb command:
  43. (gdb) where
  44. Logs:
  45. All logs are generated in the logs/ subdirctory (it is emptied first
  46. in the runtests.pl script). Use runtests.pl -k to keep the temporary files
  47. after the test run.
  48. Data:
  49. All test cases are put in the data/ subdirctory. Each test is stored in the
  50. file named according to the test number.
  51. See FILEFORMAT for the description of the test case files.
  52. TEST CASE NUMBERS
  53. So far, I've used this system:
  54. 1 - 99 HTTP
  55. 100 - 199 FTP
  56. 200 - 299 FILE
  57. 300 - 399 HTTPS
  58. 400 - 499 FTPS
  59. 500 - 599 libcurl source code tests, not using the curl command tool
  60. Since 30-apr-2003, there's nothing in the system that requires us to keep
  61. within these number series. Each test case now specifies its own server
  62. requirements, independent of test number.
  63. TODO:
  64. * Add tests for TELNET, GOPHER, LDAP, DICT...