X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Ftestsuite%2Fwait-tests.sh;h=fb3be1858540f7ded7eaec20263e99256be37f30;hb=61d1c864c55291c1f5f81f284e984b044fe2722f;hp=89eb88e23e5003ca35191acea374764ea79699a2;hpb=9445962237f6f16e63336a7fae633ca7d061c6fe;p=ngircd-alex.git diff --git a/src/testsuite/wait-tests.sh b/src/testsuite/wait-tests.sh index 89eb88e2..fb3be185 100755 --- a/src/testsuite/wait-tests.sh +++ b/src/testsuite/wait-tests.sh @@ -9,15 +9,21 @@ # (at your option) any later version. # Please read the file COPYING, README and AUTHORS for more information. # -# $Id: wait-tests.sh,v 1.3 2004/09/04 18:22:42 alex Exp $ +# $Id: wait-tests.sh,v 1.5 2005/08/12 21:34:19 alex Exp $ # [ "$1" -gt 0 ] 2> /dev/null && MAX="$1" || MAX=5 +# detect source directory +[ -z "$srcdir" ] && srcdir=`dirname $0` + PS_FLAGS="-f" ps $PS_FLAGS >/dev/null 2>&1 [ $? -ne 0 ] && PS_FLAGS="a" +# read in functions +. ${srcdir}/functions.inc + msg=0 while true; do count=`ps $PS_FLAGS | grep "expect " | wc -l` @@ -26,12 +32,12 @@ while true; do [ $count -le $MAX ] && break if [ $msg -lt 1 ]; then - echo -n " waiting for processes to settle: " + echo_n " waiting for processes to settle: " msg=1 fi # there are still clients connected. Wait ... - echo -n "$count>$MAX " + echo_n "$count>$MAX " sleep 1 done