From 2539a52e665c013f231a61d260b7404edb9e8786 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Sat, 4 Dec 2004 01:48:26 +0000 Subject: [PATCH] Faster tests. --- test/gils/.cvsignore | 1 + test/gils/stop01.sh | 6 +++--- test/gils/stop02.sh | 6 +++--- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/test/gils/.cvsignore b/test/gils/.cvsignore index f3c7c47..48b0900 100644 --- a/test/gils/.cvsignore +++ b/test/gils/.cvsignore @@ -7,3 +7,4 @@ log shadow reg zebrasrv.pid +socket diff --git a/test/gils/stop01.sh b/test/gils/stop01.sh index 99b3ae4..caf714b 100755 --- a/test/gils/stop01.sh +++ b/test/gils/stop01.sh @@ -1,5 +1,5 @@ #!/bin/sh -# $Id: stop01.sh,v 1.8 2004-12-04 01:38:50 adam Exp $ +# $Id: stop01.sh,v 1.9 2004-12-04 01:48:26 adam Exp $ # test start and stop of the server with -1 pp=${srcdir:-"."} @@ -20,15 +20,15 @@ test -f z.pid && kill -9 `cat z.pid` echo "Starting server with -1 (one shot)..." >>$LOG ../../index/zebrasrv -D -p z.pid -1 -c $pp/zebra1.cfg -l $LOG unix:socket echo " checking that it runs... " >>$LOG -test -f z.pid || sleep 2 || test -f z.pid || exit 1 +test -f z.pid || sleep 1 || test -f z.pid || exit 1 PID=`cat z.pid` kill -CHLD $PID >/dev/null 2>&1 || exit 1 echo " connecting to it..." >>$LOG ../api/testclient unix:socket utah >>$LOG || exit 1 -sleep 1 echo " checking that server does not run any more" >>$LOG +kill -CHLD $PID >/dev/null 2>&1 && sleep 1 && \ kill -CHLD $PID >/dev/null 2>&1 && exit 1 # clean up diff --git a/test/gils/stop02.sh b/test/gils/stop02.sh index 7f8a79a..889cf8c 100755 --- a/test/gils/stop02.sh +++ b/test/gils/stop02.sh @@ -1,5 +1,5 @@ #!/bin/sh -# $Id: stop02.sh,v 1.8 2004-12-04 01:38:50 adam Exp $ +# $Id: stop02.sh,v 1.9 2004-12-04 01:48:26 adam Exp $ # test start and stop of the server with -S pp=${srcdir:-"."} @@ -20,7 +20,7 @@ test -f z.pid && kill -9 `cat z.pid` echo "Starting server with -S (static)..." >>$LOG ../../index/zebrasrv -D -p z.pid -S -c $pp/zebra1.cfg -l $LOG unix:socket echo " checking that it runs... " >>$LOG -test -f z.pid || sleep 2 || test -f z.pid || exit 1 +test -f z.pid || sleep 1 || test -f z.pid || exit 1 PID=`cat z.pid` kill -CHLD $PID >/dev/null 2>&1 || exit 1 @@ -38,8 +38,8 @@ sleep 1 # let the client connect echo " killing it..." >>$LOG kill $PID -sleep 1 echo " checking that it is dead..." >>$LOG +kill -CHLD $PID >/dev/null 2>&1 && sleep 1 && \ kill -CHLD $PID >/dev/null 2>&1 && exit 1 # clean up -- 1.7.10.4