ngircd-tor/src/testsuite
Alexander Barton 192e304b94 Change build system to support new and old GNU automake
Starting with GNU automake 1.12, the "de-ANSI-fication support" has been
removed, which ngIRCd used to enable building itself on very old systems.

Now the problem is, that using automake >= 1.12 isn't working because of
the now unsupported M4 macros. Therefore the solution that this patch
implements is to dynamically generate the automake input files with our
own ./autogen.sh script:

  configure.ng => configure.in
  Makefile.ng => Makefile.am

This is quite an ugly approach, but it works and enables us to:

  1. use current automake >= 1.12 for development and "private builds",
  2. still build distribution archives using automake 1.11.x that have
     "de-ANSI-fication support" enabled in the generated Makefile's.

And if you are using Makefile's generated with a automake version newer
than 1.11.x (without "de-ANSI-fication support"), the ./configure script
warns you not to use this generated build system to generate distribution
archives.

Drawback of this patch: you MUST use our autogen.sh script, you can't call
the autoconf/automake commands directly any more; but autoreconf should
still work ...
2012-09-23 18:13:55 +02:00
..
.gitignore Change build system to support new and old GNU automake 2012-09-23 18:13:55 +02:00
Makefile.ng Change build system to support new and old GNU automake 2012-09-23 18:13:55 +02:00
README Test suite: start two servers and test server-server links 2008-11-13 22:46:06 +01:00
channel-test.e Implement RFC 2812 handling of "0" argument to JOIN 2008-02-26 23:49:33 +01:00
check-idle.e If nick name is already in use, interpret this as "clienst still connected". 2004-09-04 14:22:13 +00:00
connect-test.e - Test-Suite fuer den ngIRCd begonnen. 2002-09-09 10:16:24 +00:00
functions.inc Fixed echo without newline for systems not understanding "echo -n"; added 2004-09-06 22:04:06 +00:00
getpid.sh getpid.sh: Fix testcase error for Debian using sbuild 2012-03-03 18:53:03 +01:00
invite-test.e Removed space after # so that Cygwin's version of expect recognizes comments. 2008-05-09 21:54:47 +02:00
join-test.e tests for JOIN and various replies 2008-05-05 16:12:41 +02:00
kick-test.e Allow KICK to handle comma-delimited lists (of channels, nicks). 2008-05-05 16:12:41 +02:00
message-test.e PRIVMSG/NOTICE: handle nick!user@host masks case-insensitive 2012-01-21 13:21:36 +01:00
misc-test.e Fixes to misc-test: accept "localhost.<domain>" as well as "localhost" 2008-07-21 13:40:22 +02:00
mode-test.e Don't send trailing space in MODE messages 2008-02-26 23:49:33 +01:00
ngircd-test1.conf Testsuite: bind to loopback (127.0.0.1) interface only 2011-08-22 16:54:24 +02:00
ngircd-test2.conf Testsuite: bind to loopback (127.0.0.1) interface only 2011-08-22 16:54:24 +02:00
opless-channel-test.e Add support for modeless channels 2008-05-01 15:55:12 +02:00
server-link-test.e Test suite: start two servers and test server-server links 2008-11-13 22:46:06 +01:00
start-server.sh Testsuite start-server.sh: return correct exit code. 2008-12-03 16:49:55 +01:00
start-server1 Test suite: start two servers and test server-server links 2008-11-13 22:46:06 +01:00
start-server2 Test suite: start two servers and test server-server links 2008-11-13 22:46:06 +01:00
stop-server.sh Test suite: start two servers and test server-server links 2008-11-13 22:46:06 +01:00
stop-server1 Test suite: start two servers and test server-server links 2008-11-13 22:46:06 +01:00
stop-server2 Test suite: start two servers and test server-server links 2008-11-13 22:46:06 +01:00
stress-A.e Set timeout. 2005-08-12 21:35:12 +00:00
stress-B.e Modified expect script to work with servers having IDENT support. 2005-12-30 22:12:28 +00:00
stress-server.sh Added test if the stress-test expect script itself completes without errors. 2005-12-30 22:13:21 +00:00
test-loop.sh Enhanced messages and exit codes. 2004-09-04 19:14:46 +00:00
tests.sh Fixed echo without newline for systems not understanding "echo -n"; added 2004-09-06 22:04:06 +00:00
wait-tests.sh Detect source directory correctly. 2005-08-12 21:34:19 +00:00
who-test.e Fixed handling of WHO commands 2011-12-30 14:57:12 +01:00
whois-test.e whois-test: handle local hostname = "localhost.localdomain" 2011-11-10 11:54:22 +01:00

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.sha [<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