Commit Diff


commit - 071686ac6e7562189143ace52fd96d982d7a5726
commit + 797f9170d70507a79deaead97c74352a9cc3a929
blob - b678e10853820dddf5ac0feee16a192e6c12dafa
blob + 31048ca2dcc61ee7b082ac51e793005afdbb1ad6
--- src/testsuite/Makefile.am
+++ src/testsuite/Makefile.am
@@ -9,7 +9,7 @@
 # Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
 # der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS.
 #
-# $Id: Makefile.am,v 1.8 2002/09/20 15:39:24 alex Exp $
+# $Id: Makefile.am,v 1.9 2002/11/10 14:28:06 alex Exp $
 #
 
 AUTOMAKE_OPTIONS = ../portab/ansi2knr
@@ -25,7 +25,7 @@ EXTRA_DIST = \
 
 clean-local:
 	rm -rf logs tests *-test ngircd-test.log ngircd-test.motd \
-	 ngircd-TEST* procs.tmp 
+	 T-ngircd procs.tmp 
 
 maintainer-clean-local:
 	rm -f Makefile Makefile.in
@@ -33,7 +33,7 @@ maintainer-clean-local:
 check_SCRIPTS = ngircd-TEST-Binary tests.sh
 
 ngircd-TEST-Binary:
-	cp ../ngircd/ngircd ngircd-TEST
+	cp ../ngircd/ngircd T-ngircd
 	[ -f getpid.sh ] || ln -s $(srcdir)/getpid.sh .
 
 connect-test: tests.sh
blob - 973c67f3912210defa40a1129994246332347dcd
blob + 8e6c63818c511ee82cabfba01508f5879cd87379
--- src/testsuite/getpid.sh
+++ src/testsuite/getpid.sh
@@ -1,22 +1,24 @@
 #!/bin/sh
 # ngIRCd Test Suite
-# $Id: getpid.sh,v 1.1 2002/09/20 14:46:55 alex Exp $
+# $Id: getpid.sh,v 1.2 2002/11/10 14:28:06 alex Exp $
 
 # wurde ein Name uebergeben?
 [ $# -ne 1 ] && exit 1
 
 # Flags fuer "ps" ermitteln
 if [ `uname` = "FreeBSD" ]; then
-  PS_FLAGS=-a; PS_PIDCOL=1
+  PS_FLAGS="-a"; PS_PIDCOL="1"; HEAD_FLAGS="-n 1"
+elif [ `uname` = "A/UX" ]; then
+  PS_FLAGS="-ae"; PS_PIDCOL="1"; HEAD_FLAGS="-1"
 else
-  PS_FLAGS=-f; PS_PIDCOL=2
+  PS_FLAGS="-f"; PS_PIDCOL="2"; HEAD_FLAGS="-n 1"
   ps $PS_FLAGS > /dev/null 2>&1
-  if [ $? -ne 0 ]; then PS_FLAGS=a; PS_PIDCOL=1; fi
+  if [ $? -ne 0 ]; then PS_FLAGS="a"; PS_PIDCOL="1"; fi
 fi
 
 # PID ermitteln
 ps $PS_FLAGS > procs.tmp
-pid=`cat procs.tmp | grep "$1" | awk "{ print \\\$$PS_PIDCOL }" | sort -n | head -n 1`
+pid=$( cat procs.tmp | grep "$1" | awk "{print \$$PS_PIDCOL}" | sort -n | head $HEAD_FLAGS )
 
 # ermittelte PID validieren
 [ "$pid" -gt 1 ] > /dev/null 2>&1
blob - 7c2f7c29c6d1fe1dec46cd18e1ee6b656226e1c7
blob + b342dedbb4ea4c3182e1181d2c5303c75877f38c
--- src/testsuite/start-server.sh
+++ src/testsuite/start-server.sh
@@ -1,6 +1,6 @@
 #!/bin/sh
 # ngIRCd Test Suite
-# $Id: start-server.sh,v 1.9 2002/09/23 22:07:42 alex Exp $
+# $Id: start-server.sh,v 1.10 2002/11/10 14:28:06 alex Exp $
 
 [ -z "$srcdir" ] && srcdir=`dirname $0`
 
@@ -12,7 +12,7 @@ rm -rf logs *.log
 # pruefen, ob getpid.sh gueltige PID's liefert. Wenn dem nicht so ist,
 # wird kein ngIRCd gestartet, da dieser ansonsten nicht mehr am Ende
 # des Testlaufs beendet werden koennte!
-./getpid.sh make > /dev/null 2>&1
+./getpid.sh sh > /dev/null 2>&1
 if [ $? -ne 0 ]; then
   echo "      error: getpid.sh FAILED!"
   exit 1
@@ -22,11 +22,11 @@ fi
 echo "This is an ngIRCd Test Server" > ngircd-test.motd
 
 # Test-Server starten ...
-./ngircd-TEST -np -f ${srcdir}/ngircd-test.conf > ngircd-test.log 2>&1 &
+./T-ngircd -np -f ${srcdir}/ngircd-test.conf > ngircd-test.log 2>&1 &
 sleep 1
 
 # validieren, dass Server laeuft
-pid=`./getpid.sh ngircd-TEST`
+pid=`./getpid.sh T-ngircd`
 [ -n "$pid" ] && kill -0 $pid > /dev/null 2>&1 || exit 1
 
 # -eof-
blob - d5a5b06745dddfa36da71f10f68b6f7e0f494076
blob + a9cce99f87760f4a4f44d6c358efeac853dae654
--- src/testsuite/stop-server.sh
+++ src/testsuite/stop-server.sh
@@ -1,13 +1,13 @@
 #!/bin/sh
 # ngIRCd Test Suite
-# $Id: stop-server.sh,v 1.8 2002/09/23 22:07:42 alex Exp $
+# $Id: stop-server.sh,v 1.9 2002/11/10 14:28:06 alex Exp $
 
 [ -z "$srcdir" ] && srcdir=`dirname $0`
 
 echo "      stopping server ..."
 
 # Test-Server stoppen ...
-pid=`./getpid.sh ngircd-TEST`
+pid=`./getpid.sh T-ngircd`
 [ -n "$pid" ] && kill $pid > /dev/null 2>&1 || exit 1
 sleep 1