First step to add testing of the server to the nightlybuild.
For now, just some simple checks are added.
This commit is contained in:
parent
7db0d77710
commit
3629f0fe1e
2 changed files with 142 additions and 8 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue