1. ngIRCd - Next Generation IRC Server
  2. (c)2001-2008 Alexander Barton,
  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. <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. [<id>]
  30. 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 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 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. [<clientCount> [<maxConcurrent>]]
  41. 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.
  45. Most of the tests scripts are symlinked to, which in turn
  46. uses expect(1) to run the respective script <name>.e and checks
  47. its exit code.
  48. [<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. [<max>]
  53. 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