3 # $Id: stress-server.sh,v 1.1 2002/09/09 22:56:07 alex Exp $
8 test=`echo ${name} | cut -d '.' -f 1`
11 type expect > /dev/null 2>&1
13 echo "SKIP: ${name} -- \"expect\" not found."; exit 77
15 type telnet > /dev/null 2>&1
17 echo "SKIP: ${name} -- \"telnet\" not found."; exit 77
20 echo " stressing server with $CLIENTS clients (be patient!) ..."
22 while [ ${no} -lt $CLIENTS ]; do
23 cat stress-A.e > tests/${no}.e
24 echo "send \"nick test${no}\\r\"" >> tests/${no}.e
25 cat stress-B.e >> tests/${no}.e
29 while [ ${no} -lt $CLIENTS ]; do
30 expect tests/${no}.e > logs/stress-${no}.log 2> /dev/null &
34 touch logs/check-idle.log
36 expect check-idle.e >> logs/check-idle.log
38 [ $res -eq 0 ] && exit 0
39 [ $res -eq 1 ] && exit 1
41 echo "====================" >> logs/check-idle.log