README 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. ngIRCd - Next Generation IRC Server
  2. (c)2001-2008 Alexander Barton,
  3. alex@barton.de, http://www.barton.de/
  4. ngIRCd is free software and published under the
  5. terms of the GNU General Public License.
  6. -- README for the Test Suite --
  7. I. Overview
  8. ~~~~~~~~~~~
  9. The purpose of the "test suite" contained in this directory is to detect
  10. bugs and incompatibilities in ngIRCd introduced during coding and after
  11. building ngIRCd on a specific platform.
  12. To run the "standard" tests call "make check" (which runs "make check" in
  13. all the source directories, testing the "portab" library as well for example)
  14. or "make testsuite" (which only runs the tests in this directory). Both will
  15. build ngIRCd (if required) and run some tests on it. These tests should be
  16. portable and run on all supported platforms without errors.
  17. NOTE #1: most tests of this suite depend on the external tools expect(1)
  18. and telnet(1), so make sure you have them installed. If not, the tests will
  19. not fail but simply be skipped.
  20. NOTE #2: the two test servers started by this test suite are configured to
  21. run on port 6789 and 6790; so it will fail if one or both of these ports
  22. are already used by some other daemons!
  23. II. Shell Scripts
  24. ~~~~~~~~~~~~~~~~
  25. getpid.sh <name>
  26. This script is used to detect the PID of the running process with
  27. the given name in a portable manner. The result is echoed on the
  28. console. It is a helper script for some other scripts of this suite.
  29. start-server.sh [<id>]
  30. start-server.sh starts up the test binary, "T-ngircd<id>" (the default
  31. for <id> is 1) with configuration file "ngircd-test<id>.conf" and the
  32. console output redirected to "ngircd-test<id>.log".
  33. The script first makes sure that getpid.sh is available and working,
  34. and that no other instance of the test binary is already running.
  35. The exit code is 0 if the test binary could be started.
  36. stop-server.sha [<id>]
  37. This script uses getpid.sh to detect a running test binary
  38. "T-ngircd<id>" and then shuts it down using the TERM signal.
  39. The exit code is 0 if the test binary could be stopped.
  40. stress-server.sh [<clientCount> [<maxConcurrent>]]
  41. stress-server.sh starts <clientCount> clients that "stress" the
  42. running test server (id 1); but no more than <maxConcurrent> clients
  43. are started at the same moment.
  44. tests.sh
  45. Most of the tests scripts are symlinked to tests.sh, which in turn
  46. uses expect(1) to run the respective script <name>.e and checks
  47. its exit code.
  48. test-loop.sh [<loops> [<wait>]]
  49. This script runs all the tests <loops> times (default: 5) and pauses
  50. <wait> seconds (default: 5) betweed runs.
  51. It isn't used by "make check" or "make testsuite".
  52. wait-tests.sh [<max>]
  53. stress-server.sh uses this script to ensure that no more than <max>
  54. clients are connected to the test server (id 1).
  55. III. Scripts for expect(1)
  56. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  57. channel-test.e
  58. check-idle.e
  59. connect-test.e
  60. invite-test.e
  61. join-test.e
  62. kick-test.e
  63. message-test.e
  64. misc-test.e
  65. mode-test.e
  66. opless-channel-test.e
  67. server-link-test.e
  68. stress-A.e
  69. stress-B.e
  70. who-test.e