From db8241bf9000810986cd427f064fa23ce06bf5e5 Mon Sep 17 00:00:00 2001 From: Michael Poole Date: Fri, 17 Jun 2005 02:51:55 +0000 Subject: [PATCH] Add missing header to ircd_string.h; add debug logging to test scripts. git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/trunk@1426 c9e4aea6-c8fd-4c43-8297-357d70d61c8c --- ChangeLog | 17 +++++++++++++++-- include/ircd_string.h | 3 +++ ircd/test/.cvsignore | 1 + ircd/test/Makefile.in | 2 +- ircd/test/kill-block-1.cmd | 2 ++ ircd/test/run-tests.sh | 19 +++++++++++-------- 6 files changed, 33 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index ef85125..4201d70 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,17 @@ -2005-05-13 Michael Poole +2005-06-16 Michael Poole + + * include/ircd_string.h: Include necessary header. + + * ircd/test/.cvsignore: Ignore log output files. + + * ircd/test/Makefile.in: Remove log output files. + + * ircd/test/kill-block-1.cmd: Add sleeps to try to trigger Kills. + + * ircd/test/run-tests.sh: Switch sense of argument. Send an IRC + debug dump to log files. + +2005-06-13 Michael Poole * ircd/s_user.c (make_user): Unconditionally increment userCount. (free_user): Unconditionally decrement it here. @@ -11,7 +24,7 @@ ban-walking loop. Add missing "e" to "members". -2005-05-10 Michael Poole +2005-06-10 Michael Poole * ircd/match.c (check_if_ipmask): Strings that contain '?' cannot be true IP masks. diff --git a/include/ircd_string.h b/include/ircd_string.h index 888cfb3..7562135 100644 --- a/include/ircd_string.h +++ b/include/ircd_string.h @@ -4,6 +4,9 @@ */ #ifndef INCLUDED_ircd_string_h #define INCLUDED_ircd_string_h + +#include /* for DupString()'s strcpy, strlen */ + #ifndef INCLUDED_ircd_chattr_h #include "ircd_chattr.h" #endif diff --git a/ircd/test/.cvsignore b/ircd/test/.cvsignore index 58278b3..f7c2a21 100644 --- a/ircd/test/.cvsignore +++ b/ircd/test/.cvsignore @@ -2,3 +2,4 @@ Makefile ircd_chattr_t ircd_in_addr_t ircd_string_t +*.log diff --git a/ircd/test/Makefile.in b/ircd/test/Makefile.in index 44b4cda..47850c5 100644 --- a/ircd/test/Makefile.in +++ b/ircd/test/Makefile.in @@ -60,7 +60,7 @@ distclean: clean rm -f Makefile clean: - rm -f core *.o ${TESTPROGS} + rm -f core *.o *.log ${TESTPROGS} # DO NOT DELETE THIS LINE (or the blank line after it) -- make depend depends on them. diff --git a/ircd/test/kill-block-1.cmd b/ircd/test/kill-block-1.cmd index a9e4f26..d76962f 100644 --- a/ircd/test/kill-block-1.cmd +++ b/ircd/test/kill-block-1.cmd @@ -2,3 +2,5 @@ define srv localhost:7701 connect cl1 Alex sub7 %srv% :s7server connect cl2 Chloe chloe %srv% :Chloe +cl1 sleep 30 +cl2 sleep 30 diff --git a/ircd/test/run-tests.sh b/ircd/test/run-tests.sh index a6605d6..d16cf04 100755 --- a/ircd/test/run-tests.sh +++ b/ircd/test/run-tests.sh @@ -1,19 +1,22 @@ #! /bin/sh + set -e -srcdir=$1 +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." -../ircd -v -../ircd -x 6 -k -d . -f ircd-t1.conf -c user@127.0.0.1 +${ircdir}/ircd -v +${ircdir}/ircd -x 6 -k -d . -f ircd-t1.conf -c user@127.0.0.1 echo "Starting ircd." -../ircd -d . -f ircd-t1.conf -../ircd -d . -f ircd-t2.conf +${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 command-1 feature-1 gline-1 stats-1 jupe-1 kill-block-1 ; do +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 ${srcdir}/${script}.cmd + ${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 @@ -24,4 +27,4 @@ kill -INT `cat ircd-t1.pid` sleep 610 kill -TERM `cat ircd-t1.pid` `cat ircd-t2.pid` sleep 1 -../ircd -? || true +${ircdir}/ircd -? || true -- 2.20.1