Tree


Makefile.ngcommits | blame
READMEcommits | blame
channel-test.ecommits | blame
check-idle.ecommits | blame
cleanup-server3*commits | blame
connect-ssl-cert1-test.ecommits | blame
connect-ssl-cert2-test.ecommits | blame
connect-test.ecommits | blame
functions.inccommits | blame
getpid.sh*commits | blame
invite-test.ecommits | blame
join-test.ecommits | blame
kick-test.ecommits | blame
message-test.ecommits | blame
misc-test.ecommits | blame
mode-test.ecommits | blame
ngircd-test1.confcommits | blame
ngircd-test2.confcommits | blame
ngircd-test3.confcommits | blame
opless-channel-test.ecommits | blame
prep-server3*commits | blame
reload-server.sh*commits | blame
reload-server3*commits | blame
server-link-test.ecommits | blame
server-login-test.ecommits | blame
ssl/
start-server.sh*commits | blame
start-server1*commits | blame
start-server2*commits | blame
start-server3*commits | blame
stop-server.sh*commits | blame
stop-server1*commits | blame
stop-server2*commits | blame
stop-server3*commits | blame
stress-A.ecommits | blame
stress-B.ecommits | blame
stress-server.sh*commits | blame
switch-server3*commits | blame
test-loop.sh*commits | blame
tests.sh*commits | blame
wait-tests.sh*commits | blame
who-test.ecommits | blame
whois-test.ecommits | blame

README

                     ngIRCd - Next Generation IRC Server

                       (c)2001-2008 Alexander Barton,
                    alex@barton.de, http://www.barton.de/

               ngIRCd is free software and published under the
                   terms of the GNU General Public License.

		       -- README for the Test Suite --


I. Overview
~~~~~~~~~~~

The purpose of the "test suite" contained in this directory is to detect
bugs and incompatibilities in ngIRCd introduced during coding and after
building ngIRCd on a specific platform.

To run the "standard" tests call "make check" (which runs "make check" in
all the source directories, testing the "portab" library as well for example)
or "make testsuite" (which only runs the tests in this directory). Both will
build ngIRCd (if required) and run some tests on it. These tests should be
portable and run on all supported platforms without errors.

NOTE #1: most tests of this suite depend on the external tools expect(1)
and telnet(1), so make sure you have them installed. If not, the tests will
not fail but simply be skipped.

NOTE #2: the two test servers started by this test suite are configured to
run on port 6789 and 6790; so it will fail if one or both of these ports
are already used by some other daemons!


II. Shell Scripts
~~~~~~~~~~~~~~~~

getpid.sh <name>

	This script is used to detect the PID of the running process with
	the given name in a portable manner. The result is echoed on the
	console. It is a helper script for some other scripts of this suite.

start-server.sh [<id>]

	start-server.sh starts up the test binary, "T-ngircd<id>" (the default
	for <id> is 1) with configuration file "ngircd-test<id>.conf" and the
	console output redirected to "ngircd-test<id>.log".
	The script first makes sure that getpid.sh is available and working,
	and that no other instance of the test binary is already running.
	The exit code is 0 if the test binary could be started.

stop-server.sh [<id>]

	This script uses getpid.sh to detect a running test binary
	"T-ngircd<id>" and then shuts it down using the TERM signal.
	The exit code is 0 if the test binary could be stopped.

stress-server.sh [<clientCount> [<maxConcurrent>]]

	stress-server.sh starts <clientCount> clients that "stress" the
	running test server (id 1); but no more than <maxConcurrent> clients
	are started at the same moment.

tests.sh

	Most of the tests scripts are symlinked to tests.sh, which in turn
	uses expect(1) to run the respective script <name>.e and checks
	its exit code.

test-loop.sh [<loops> [<wait>]]

	This script runs all the tests <loops> times (default: 5) and pauses
	<wait> seconds (default: 5) betweed runs.
	It isn't used by "make check" or "make testsuite".

wait-tests.sh [<max>]

	stress-server.sh uses this script to ensure that no more than <max>
	clients are connected to the test server (id 1).


III. Scripts for expect(1)
~~~~~~~~~~~~~~~~~~~~~~~~~~

channel-test.e
check-idle.e
connect-test.e
invite-test.e
join-test.e
kick-test.e
message-test.e
misc-test.e
mode-test.e
opless-channel-test.e
server-link-test.e
stress-A.e
stress-B.e
who-test.e
whois-test.e