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