]> jfr.im git - irc/quakenet/snircd.git/blame - ircd/test/run-tests.sh
forward port of asuka-forcedinvis.patch to .12
[irc/quakenet/snircd.git] / ircd / test / run-tests.sh
CommitLineData
189935b1 1#! /bin/sh
2
3set -e
4srcdir=`dirname $0`
5ircdir=$1
6
7cp ${srcdir}/ircd-t1.conf ircd-t1.conf
8cp ${srcdir}/ircd-t2.conf ircd-t2.conf
9echo "Testing one-shot ircd invocations."
10${ircdir}/ircd -v
11${ircdir}/ircd -x 6 -k -d . -f ircd-t1.conf -c user@127.0.0.1
12echo "Starting ircd."
13${ircdir}/ircd -d . -f ircd-t1.conf
14${ircdir}/ircd -d . -f ircd-t2.conf
15sleep 10
16# stats-1 is out of alphabetical order to avoid triggering IPcheck.
17for script in channel-1 client-1 commands-1 feature-1 gline-1 stats-1 jupe-1 kill-block-1 ; do
18 echo "Running test $script."
19 ${srcdir}/test-driver.pl -D ${srcdir}/${script}.cmd 2> ${script}.log
20done
21echo "Sending signals to server."
22cp ${srcdir}/ircd-t1-2.conf ircd-t1.conf
23kill -HUP `cat ircd-t1.pid`
24sleep 1
25kill -INT `cat ircd-t1.pid`
26# A long sleep is necessary to make the server flush its IPcheck entries.
27sleep 610
28kill -TERM `cat ircd-t1.pid` `cat ircd-t2.pid`
29sleep 1
30${ircdir}/ircd -? || true