First step to add testing of the server to the nightlybuild.

For now, just some simple checks are added.
This commit is contained in:
Marc Olzheim 2004-06-16 16:06:17 +00:00
parent 7db0d77710
commit 3629f0fe1e
2 changed files with 142 additions and 8 deletions

View file

@ -11,3 +11,25 @@ err() {
warn() {
echo "WARNING: $@" >&2
}
trykill() {
[ -n "$1" ] || { warn "INTERNAL ERROR: trykill: no argument ?" ; return 2 ; }
kill -TERM "$1" || { warn "Could not kill pid '${1}'" ; return 1 ; }
sleep 1
/bin/kill -KILL "$1" 2>/dev/null && { warn "Process ${1} would not die" ; }
sleep 1
/bin/kill -KILL "$1" 2>/dev/null && { warn "Process ${1} would not die after -KILL" ; return 1 ; }
return 0
}
runfeed() {
[ -n "$1" ] || { warn "INTERNAL ERROR: No coun/repr given ?" ; return 2 ; }
REP="$2"
[ -n "$REP" ] || REP="$1"
{
cat
echo "quit"
} | ./emp_client "$1" "$REP" || { warn "emp_client not ok ?" ; return 1 ; }
return 0
}