3 # $Id: tests.sh,v 1.6 2004/09/04 19:14:46 alex Exp $
5 # detect source directory
6 [ -z "$srcdir" ] && srcdir=`dirname $0`
9 test=`echo ${name} | cut -d '.' -f 1`
12 if [ ! -r "$test" ]; then
13 echo " ${name}: test \"$test\" not found!"; exit 77
17 type expect > /dev/null 2>&1
19 echo " ${name}: \"expect\" not found."; exit 77
21 type telnet > /dev/null 2>&1
23 echo " ${name}: \"telnet\" not found."; exit 77
26 echo -n " running ${test} ..."
27 expect ${srcdir}/${test}.e > logs/${test}.log 2>&1; r=$?
28 [ $r -eq 0 ] && echo " ok." || echo " failure!"