Commit Diff


commit - aa26e2ef36b9a4b5546b8a46ec26cc6fd943d572
commit + c5bdd86f96906a5367568d5210be59d1d36677e5
blob - dd59719c29d862e2405d530c230779670b1cda88
blob + ac8ce8158f8866febed60a34a231a6f2bb00fdc1
--- src/testsuite/start-server.sh
+++ src/testsuite/start-server.sh
@@ -1,10 +1,10 @@
 #!/bin/sh
 # ngIRCd Test Suite
-# $Id: start-server.sh,v 1.12 2004/09/04 13:58:31 alex Exp $
+# $Id: start-server.sh,v 1.13 2004/09/04 19:14:46 alex Exp $
 
 [ -z "$srcdir" ] && srcdir=`dirname $0`
 
-echo "      starting server ..."
+echo -n "      starting server ..."
 
 # remove old logfiles
 rm -rf logs *.log
@@ -13,14 +13,14 @@ rm -rf logs *.log
 # test-server, because we won't be able to kill it at the end of the test.
 ./getpid.sh sh > /dev/null 2>&1
 if [ $? -ne 0 ]; then
-  echo "      error: getpid.sh FAILED!"
+  echo " getpid.sh failed!"
   exit 1
 fi
 
 # check if there is a test-server already running
 ./getpid.sh T-ngircd > /dev/null 2>&1
 if [ $? -eq 0 ]; then
-  echo "      error: test-server already running!"
+  echo " failure: test-server already running!"
   exit 1
 fi
 
@@ -33,6 +33,9 @@ sleep 1
 
 # validate running test-server
 pid=`./getpid.sh T-ngircd`
-[ -n "$pid" ] && kill -0 $pid > /dev/null 2>&1 || exit 1
+[ -n "$pid" ] && kill -0 $pid > /dev/null 2>&1; r=$?
 
+[ $r -eq 0 ] && echo " ok." || echo " failure!"
+exit 
+
 # -eof-
blob - d76871b88175e63755189a1ce3f9dbf31ccb3a22
blob + 1b966bab04223d4dc0754342aad029f69f0b20ac
--- src/testsuite/stop-server.sh
+++ src/testsuite/stop-server.sh
@@ -1,25 +1,29 @@
 #!/bin/sh
 # ngIRCd Test Suite
-# $Id: stop-server.sh,v 1.10 2003/08/22 11:31:18 alex Exp $
+# $Id: stop-server.sh,v 1.11 2004/09/04 19:14:46 alex Exp $
 
 [ -z "$srcdir" ] && srcdir=`dirname $0`
 
-echo "      stopping server ..."
+echo -n "      stopping server ..."
 
 # stop test-server ...
 pid=`./getpid.sh T-ngircd`
 if [ -z "$pid" ]; then
-  echo "      no running server found!?"
+  echo " failure: no running server found!?"
   exit 1
 fi
 kill $pid > /dev/null 2>&1 || exit 1
 
 # waiting ...
 for i in 1 2 3 4 5; do
-  kill -0 $pid > /dev/null 2>&1 || exit 0
+  kill -0 $pid > /dev/null 2>&1; r=$?
+  if [ $r -eq 0 ]; then
+    echo " ok".
+    exit 0
+  fi
   sleep 1
 done
-echo "      server still running!?"
+echo " failure: server still running!?"
 exit 1
 
 # -eof-
blob - 397c8f956b85ab28021ab2d3cbac311fc78448f8
blob + c9b31b8242b20c5bf009a7065ba9730c04962083
--- src/testsuite/stress-server.sh
+++ src/testsuite/stress-server.sh
@@ -9,7 +9,7 @@
 # (at your option) any later version.
 # Please read the file COPYING, README and AUTHORS for more information.
 #
-# $Id: stress-server.sh,v 1.13 2004/09/04 18:20:16 alex Exp $
+# $Id: stress-server.sh,v 1.14 2004/09/04 19:14:46 alex Exp $
 #
 
 # detect source directory
@@ -69,7 +69,7 @@ while true; do
   echo -n "."
 done
 
-[ $res -eq 0 ] && echo " done." || echo " ERROR!"
+[ $res -eq 0 ] && echo " ok." || echo " failure!"
 
 exit $res
 
blob - 2db9d00b276d99fff39da6bdc55eb93492dcd0ac
blob + 68c87d28989059301d2bfec85fa581905216488b
--- src/testsuite/test-loop.sh
+++ src/testsuite/test-loop.sh
@@ -9,7 +9,7 @@
 # (at your option) any later version.
 # Please read the file COPYING, README and AUTHORS for more information.
 #
-# $Id: test-loop.sh,v 1.1 2004/09/04 15:44:45 alex Exp $
+# $Id: test-loop.sh,v 1.2 2004/09/04 19:14:46 alex Exp $
 #
 
 # detect source directory
@@ -22,9 +22,10 @@
 loop=0
 while [ ${loop} -lt $LOOPS ]; do
   loop=`expr ${loop} + 1`
-  echo "      loop $loop/$LOOPS starting ..."
+  echo "      loop $loop/$LOOPS starting:"
   for s in $srcdir/*-test; do
-    sh $s
+    sh $s; r=$?
+    [ $r -ne 0 ] && exit $r
     sleep 1
   done
   if [ ${loop} -lt $LOOPS ]; then
blob - 31d99d9d971c526770e94fdff7aac56c0f8c1963
blob + bbb76add9e7f29f8ca918b64bf5bef6d8284ed5b
--- src/testsuite/tests.sh
+++ src/testsuite/tests.sh
@@ -1,6 +1,6 @@
 #!/bin/sh
 # ngIRCd Test Suite
-# $Id: tests.sh,v 1.5 2004/09/04 14:22:38 alex Exp $
+# $Id: tests.sh,v 1.6 2004/09/04 19:14:46 alex Exp $
 
 # detect source directory
 [ -z "$srcdir" ] && srcdir=`dirname $0`
@@ -9,6 +9,11 @@ name=`basename $0`
 test=`echo ${name} | cut -d '.' -f 1`
 mkdir -p logs
 
+if [ ! -r "$test" ]; then
+  echo "      ${name}: test \"$test\" not found!";  exit 77
+  exit 1
+fi
+
 type expect > /dev/null 2>&1
 if [ $? -ne 0 ]; then
   echo "      ${name}: \"expect\" not found.";  exit 77
@@ -18,7 +23,10 @@ if [ $? -ne 0 ]; then
   echo "      ${name}: \"telnet\" not found.";  exit 77
 fi
 
-echo "      doing ${test} ..."
-expect ${srcdir}/${test}.e > logs/${test}.log
+echo -n "      running ${test} ..."
+expect ${srcdir}/${test}.e > logs/${test}.log 2>&1; r=$?
+[ $r -eq 0 ] && echo " ok." || echo " failure!"
 
+exit $r
+
 # -eof-