mirror of
https://github.com/osmarks/ngircd.git
synced 2024-10-28 12:56:18 +00:00
7ad167f4c4
I changed the test suite to start two test servers (on port 6789 and 6790), so server-server links can be tested as well for which I included the new test script "server-link-test.e". In addition the documentation of the test suite (src/testsuite/README) has been updated and is more complete now.
38 lines
596 B
Bash
Executable File
38 lines
596 B
Bash
Executable File
#!/bin/sh
|
|
# ngIRCd Test Suite
|
|
|
|
[ -z "$srcdir" ] && srcdir=`dirname $0`
|
|
|
|
# read in functions
|
|
. ${srcdir}/functions.inc
|
|
|
|
if [ -n "$1" ]; then
|
|
id="$1"; shift
|
|
else
|
|
id="1"
|
|
fi
|
|
|
|
echo_n " stopping server ${id} ..."
|
|
|
|
# stop test-server ...
|
|
pid=`./getpid.sh T-ngircd${id}`
|
|
if [ -z "$pid" ]; then
|
|
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; r=$?
|
|
if [ $r -ne 0 ]; then
|
|
echo " ok".
|
|
exit 0
|
|
fi
|
|
sleep 1
|
|
done
|
|
echo " failure: server ${id} still running!?"
|
|
exit 1
|
|
|
|
# -eof-
|