X-Git-Url: http://git.pk910.de/?p=ircu2.10.12-pk.git;a=blobdiff_plain;f=ircd%2Ftest%2Frun-tests.sh;fp=ircd%2Ftest%2Frun-tests.sh;h=d16cf04171bfebb8fa3d62e1bd2390bea14cdeee;hp=0000000000000000000000000000000000000000;hb=0400a5a6479398d82526785c18c0df8bc8b92dce;hpb=d17e10da972ce5776c60b4c317267c6abe0e1ead diff --git a/ircd/test/run-tests.sh b/ircd/test/run-tests.sh new file mode 100755 index 0000000..d16cf04 --- /dev/null +++ b/ircd/test/run-tests.sh @@ -0,0 +1,30 @@ +#! /bin/sh + +set -e +srcdir=`dirname $0` +ircdir=$1 + +cp ${srcdir}/ircd-t1.conf ircd-t1.conf +cp ${srcdir}/ircd-t2.conf ircd-t2.conf +echo "Testing one-shot ircd invocations." +${ircdir}/ircd -v +${ircdir}/ircd -x 6 -k -d . -f ircd-t1.conf -c user@127.0.0.1 +echo "Starting ircd." +${ircdir}/ircd -d . -f ircd-t1.conf +${ircdir}/ircd -d . -f ircd-t2.conf +sleep 10 +# stats-1 is out of alphabetical order to avoid triggering IPcheck. +for script in channel-1 client-1 commands-1 feature-1 gline-1 stats-1 jupe-1 kill-block-1 ; do + echo "Running test $script." + ${srcdir}/test-driver.pl -D ${srcdir}/${script}.cmd 2> ${script}.log +done +echo "Sending signals to server." +cp ${srcdir}/ircd-t1-2.conf ircd-t1.conf +kill -HUP `cat ircd-t1.pid` +sleep 1 +kill -INT `cat ircd-t1.pid` +# A long sleep is necessary to make the server flush its IPcheck entries. +sleep 610 +kill -TERM `cat ircd-t1.pid` `cat ircd-t2.pid` +sleep 1 +${ircdir}/ircd -? || true