mirror of
https://github.com/osmarks/ngircd.git
synced 2025-06-26 15:12:51 +00:00
- Backports aus CVS-HEAD: neues Script getpid.sh ermittelt nun die PID.
This commit is contained in:
parent
9f9f676716
commit
8c956d25b7
@ -9,7 +9,7 @@
|
|||||||
# Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
|
# Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
|
||||||
# der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS.
|
# der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS.
|
||||||
#
|
#
|
||||||
# $Id: Makefile.am,v 1.3 2002/09/12 02:26:17 alex Exp $
|
# $Id: Makefile.am,v 1.3.2.1 2002/09/20 15:18:56 alex Exp $
|
||||||
#
|
#
|
||||||
|
|
||||||
AUTOMAKE_OPTIONS = ../portab/ansi2knr
|
AUTOMAKE_OPTIONS = ../portab/ansi2knr
|
||||||
@ -17,21 +17,23 @@ AUTOMAKE_OPTIONS = ../portab/ansi2knr
|
|||||||
INCLUDES = -I$(srcdir)/../portab
|
INCLUDES = -I$(srcdir)/../portab
|
||||||
|
|
||||||
EXTRA_DIST = \
|
EXTRA_DIST = \
|
||||||
|
getpid.sh \
|
||||||
start-server.sh stop-server.sh tests.sh stress-server.sh \
|
start-server.sh stop-server.sh tests.sh stress-server.sh \
|
||||||
connect-test.e channel-test.e mode-test.e \
|
connect-test.e channel-test.e mode-test.e \
|
||||||
stress-A.e stress-B.e check-idle.e \
|
stress-A.e stress-B.e check-idle.e \
|
||||||
ngircd-test.conf
|
ngircd-test.conf
|
||||||
|
|
||||||
clean-local:
|
clean-local:
|
||||||
rm -rf logs tests *-test ngircd-test.log ngircd-test.motd ngircd-TEST procs.tmp
|
rm -rf logs tests *-test ngircd-test.log ngircd-test.motd \
|
||||||
|
ngircd-TEST* procs.tmp
|
||||||
|
|
||||||
maintainer-clean-local:
|
maintainer-clean-local:
|
||||||
rm -f Makefile Makefile.in
|
rm -f Makefile Makefile.in
|
||||||
|
|
||||||
check_SCRIPTS = ngircd-TEST tests.sh
|
check_SCRIPTS = ngircd-TEST-Binary tests.sh
|
||||||
|
|
||||||
ngircd-TEST:
|
ngircd-TEST-Binary:
|
||||||
ln -s ../ngircd/ngircd ngircd-TEST
|
cp ../ngircd/ngircd ngircd-TEST
|
||||||
|
|
||||||
connect-test: tests.sh
|
connect-test: tests.sh
|
||||||
ln -s $(srcdir)/tests.sh connect-test
|
ln -s $(srcdir)/tests.sh connect-test
|
||||||
|
@ -1,22 +1,30 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# ngIRCd Test Suite
|
# ngIRCd Test Suite
|
||||||
# $Id: start-server.sh,v 1.5.2.2 2002/09/20 13:55:51 alex Exp $
|
# $Id: start-server.sh,v 1.5.2.3 2002/09/20 15:18:56 alex Exp $
|
||||||
|
|
||||||
echo " starting server ..."
|
echo " starting server ..."
|
||||||
|
|
||||||
rm -rf logs
|
# alte Logfiles loeschen
|
||||||
|
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
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo " error: getpid.sh FAILED!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# MOTD fuer Test-Server erzeugen
|
||||||
echo "This is an ngIRCd Test Server" > ngircd-test.motd
|
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 &
|
./ngircd-TEST -np -f ${srcdir}/ngircd-test.conf > ngircd-test.log 2>&1 &
|
||||||
sleep 1
|
sleep 1
|
||||||
|
|
||||||
PS_FLAGS=-f; PS_PIDCOL=2
|
# validieren, dass Server laeuft
|
||||||
ps $PS_FLAGS > /dev/null 2>&1
|
pid=`./getpid.sh ngircd-TEST`
|
||||||
if [ $? -ne 0 ]; then PS_FLAGS=a; PS_PIDCOL=1; fi
|
|
||||||
|
|
||||||
ps $PS_FLAGS > procs.tmp
|
|
||||||
pid=`cat procs.tmp | grep ngircd-TEST | awk "{ print \\\$$PS_PIDCOL }"`
|
|
||||||
[ -n "$pid" ] && kill -0 $pid > /dev/null 2>&1 || exit 1
|
[ -n "$pid" ] && kill -0 $pid > /dev/null 2>&1 || exit 1
|
||||||
|
|
||||||
# -eof-
|
# -eof-
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# ngIRCd Test Suite
|
# ngIRCd Test Suite
|
||||||
# $Id: stop-server.sh,v 1.4.2.2 2002/09/20 13:55:51 alex Exp $
|
# $Id: stop-server.sh,v 1.4.2.3 2002/09/20 15:18:56 alex Exp $
|
||||||
|
|
||||||
echo " stopping server ..."
|
echo " stopping server ..."
|
||||||
|
|
||||||
PS_FLAGS=-f; PS_PIDCOL=2
|
# Test-Server stoppen ...
|
||||||
ps $PS_FLAGS > /dev/null 2>&1
|
pid=`./getpid.sh ngircd-TEST`
|
||||||
if [ $? -ne 0 ]; then PS_FLAGS=a; PS_PIDCOL=1; fi
|
[ -n "$pid" ] && kill $pid > /dev/null 2>&1 || exit 1
|
||||||
|
sleep 1
|
||||||
|
|
||||||
ps $PS_FLAGS > procs.tmp
|
# jetzt duerfte der Prozess nicht mehr laufen
|
||||||
pid=`cat procs.tmp | grep ngircd-TEST | awk "{ print \\\$$PS_PIDCOL }"`
|
kill -0 $pid > /dev/null 2>&1 && exit 1 || exit 0
|
||||||
[ -n "$pid" ] && kill -0 $pid > /dev/null 2>&1 || exit 1
|
|
||||||
|
|
||||||
# -eof-
|
# -eof-
|
||||||
|
Loading…
x
Reference in New Issue
Block a user