3 # $Id: stress-server.sh,v 1.3 2002/09/13 06:11:19 alex Exp $
5 if [ `uname` = "Darwin" ]; then
12 test=`echo ${name} | cut -d '.' -f 1`
15 type expect > /dev/null 2>&1
17 echo "SKIP: ${name} -- \"expect\" not found."; exit 77
19 type telnet > /dev/null 2>&1
21 echo "SKIP: ${name} -- \"telnet\" not found."; exit 77
24 echo " stressing server with $CLIENTS clients (be patient!) ..."
26 while [ ${no} -lt $CLIENTS ]; do
27 cat ${srcdir}/stress-A.e > tests/${no}.e
28 echo "send \"nick test${no}\\r\"" >> tests/${no}.e
29 cat ${srcdir}/stress-B.e >> tests/${no}.e
33 while [ ${no} -lt $CLIENTS ]; do
34 expect tests/${no}.e > logs/stress-${no}.log 2> /dev/null &
38 touch logs/check-idle.log
40 expect ${srcdir}/check-idle.e >> logs/check-idle.log
42 [ $res -eq 0 ] && exit 0
43 [ $res -eq 1 ] && exit 1
45 echo "====================" >> logs/check-idle.log