From: Adam Dickmeiss Date: Tue, 6 May 2003 20:09:28 +0000 (+0000) Subject: More test updates X-Git-Tag: ZEBRA.1.3.12~66 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=20ba1d9d1d672f244ed83dee5224241df29378ea;p=idzebra-moved-to-github.git More test updates --- diff --git a/test/gils/stop01.sh b/test/gils/stop01.sh index f1b52c1..41681a6 100755 --- a/test/gils/stop01.sh +++ b/test/gils/stop01.sh @@ -1,5 +1,5 @@ #!/bin/sh -# $Id: stop01.sh,v 1.2 2003-05-06 17:39:01 adam Exp $ +# $Id: stop01.sh,v 1.3 2003-05-06 20:09:28 adam Exp $ # test start and stop of the server with -1 echo "initializing" @@ -22,15 +22,14 @@ sleep 1 echo " checking that it runs... " test -f zebrasrv.pid || exit 1 PID=`cat zebrasrv.pid` -ps -p $PID >/dev/null || exit 1 +ps -p $PID |grep $PID >/dev/null || exit 1 echo " connecting to it..." ../testclient localhost:9901 utah > log || exit 1 sleep 1 echo " checking that server does not run any more" -ps -p $PID >/dev/null && exit 1 +ps -p $PID | grep $PID >/dev/null && exit 1 -echo ok # clean up rm -rf reg idx.log srv.log zebrasrv.pid diff --git a/test/gils/stop02.sh b/test/gils/stop02.sh index d9de692..4a60a66 100755 --- a/test/gils/stop02.sh +++ b/test/gils/stop02.sh @@ -1,5 +1,5 @@ #!/bin/sh -# $Id: stop02.sh,v 1.2 2003-05-06 17:39:01 adam Exp $ +# $Id: stop02.sh,v 1.3 2003-05-06 20:09:28 adam Exp $ # test start and stop of the server with -S # # FIXME - this test does not currently pass (H 22-oct-2002) @@ -25,14 +25,14 @@ sleep 1 echo " checking that it runs... " test -f zebrasrv.pid || exit 1 PID=`cat zebrasrv.pid` -ps -p $PID >/dev/null || exit 1 +ps -p $PID |grep $PID >/dev/null || exit 1 echo " connecting to it..." ../testclient localhost:9901 utah > log || exit 1 sleep 1 echo " checking that it still runs..." -ps -p $PID >/dev/null || exit 1 +ps -p $PID | grep $PID >/dev/null || exit 1 echo " connecting again, with a delay..." ../testclient -d 5 localhost:9901 utah > log & @@ -43,8 +43,7 @@ kill $PID sleep 1 echo " checking that it is dead..." -ps -p $PID >/dev/null && exit 1 +ps -p $PID | grep $PID >/dev/null && exit 1 -echo ok # clean up rm -rf reg idx.log srv.log zebrasrv.pid diff --git a/test/gils/stop03.sh b/test/gils/stop03.sh index 23c766c..19a01f7 100755 --- a/test/gils/stop03.sh +++ b/test/gils/stop03.sh @@ -1,5 +1,5 @@ #!/bin/sh -# $Id: stop03.sh,v 1.2 2003-05-06 17:39:01 adam Exp $ +# $Id: stop03.sh,v 1.3 2003-05-06 20:09:28 adam Exp $ # test start and stop of the threaded server (-T) # # FIXME - this test does not currently pass (H 22-oct-2002) @@ -28,7 +28,7 @@ sleep 1 echo " checking that it runs... " test -f zebrasrv.pid || exit 1 PID=`cat zebrasrv.pid` -ps -p $PID >/dev/null || exit 1 +ps -p $PID | grep $PID >/dev/null || exit 1 echo " connecting to it..." ../testclient localhost:9901 utah > log || exit 1 @@ -46,8 +46,7 @@ kill $PID sleep 1 echo " checking that it is dead" -ps -p $PID >/dev/null && exit 1 +ps -p $PID | grep $PID >/dev/null && exit 1 -echo ok # clean up rm -rf reg idx.log srv.log zebrasrv.pid servercrash diff --git a/test/gils/stop04.sh b/test/gils/stop04.sh index 2b06077..bce26c3 100755 --- a/test/gils/stop04.sh +++ b/test/gils/stop04.sh @@ -1,5 +1,5 @@ #!/bin/sh -# $Id: stop04.sh,v 1.2 2003-05-06 17:39:01 adam Exp $ +# $Id: stop04.sh,v 1.3 2003-05-06 20:09:28 adam Exp $ # test start and stop of the forked server # @@ -23,14 +23,14 @@ sleep 1 echo " checking that it runs... " test -f zebrasrv.pid || exit 1 PID=`cat zebrasrv.pid` -ps -p $PID >/dev/null || exit 1 +ps -p $PID | grep $PID >/dev/null || exit 1 echo " connecting to it..." ../testclient localhost:9901 utah > log || exit 1 sleep 1 echo " checking that it still runs..." -ps -p $PID >/dev/null || exit 1 +ps -p $PID | grep $PID >/dev/null || exit 1 echo " connecting again, with a delay..." ../testclient localhost:9901 utah 5 > log & @@ -41,8 +41,7 @@ kill $PID sleep 1 echo " checking that the server is dead..." -ps -p $PID >/dev/null && exit 1 +ps -p $PID | grep $PID >/dev/null && exit 1 -echo ok # clean up rm -rf reg idx.log srv.log zebrasrv.pid diff --git a/test/gils/test1.sh b/test/gils/test1.sh index b479a39..71bbbde 100755 --- a/test/gils/test1.sh +++ b/test/gils/test1.sh @@ -1,9 +1,7 @@ #!/bin/sh -# $Id: test1.sh,v 1.4 2003-05-06 17:39:01 adam Exp $ +# $Id: test1.sh,v 1.5 2003-05-06 20:09:28 adam Exp $ echo "testing without stored keys (zebra1.cfg)" -echo "See if servers are running...." -ps ax|grep zebrasrv sleep 1 echo "initializing..." @@ -55,4 +53,3 @@ test -f zebrasrv.pid || exit 1 kill `cat zebrasrv.pid` || exit 1 rm -f zebrasrv.pid -echo "ok" diff --git a/test/gils/test2.sh b/test/gils/test2.sh index 69c0af9..92c59cf 100755 --- a/test/gils/test2.sh +++ b/test/gils/test2.sh @@ -1,5 +1,5 @@ #!/bin/sh -# $Id: test2.sh,v 1.4 2003-05-06 17:39:01 adam Exp $ +# $Id: test2.sh,v 1.5 2003-05-06 20:09:28 adam Exp $ echo "Testing with storekeys (zebra2.cfg)" echo "init..." rm -f idx.log log @@ -85,5 +85,3 @@ rm -f idx.log log rm -f records/esdd000[12].grs rm -f zebrasrv.pid rm -f srv.log - -echo ok diff --git a/test/gils/timing1.sh b/test/gils/timing1.sh index 5fd284d..d1038f2 100755 --- a/test/gils/timing1.sh +++ b/test/gils/timing1.sh @@ -1,5 +1,5 @@ #!/bin/sh -# $Id: timing1.sh,v 1.4 2003-05-06 17:39:01 adam Exp $ +# $Id: timing1.sh,v 1.5 2003-05-06 20:09:28 adam Exp $ # tests that updates are reflected immediately # in the registers. # Repeatedly modifies a record and counts hits. # Test 1: with good sleeps in every between - should pass always @@ -131,10 +131,9 @@ grep "^Result count: 10$" log || exit 1 echo "stopping server..." test -f zebrasrv.pid || exit 1 -kill -9 `cat zebrasrv.pid` || exit 1 +kill `cat zebrasrv.pid` || exit 1 rm -f idx.log log rm -f records/esdd000[12].grs rm -f zebrasrv.pid rm -f srv.log -echo ok diff --git a/test/gils/timing2.sh b/test/gils/timing2.sh index 54a1974..a9a692c 100755 --- a/test/gils/timing2.sh +++ b/test/gils/timing2.sh @@ -1,5 +1,5 @@ #!/bin/sh -# $Id: timing2.sh,v 1.4 2003-05-06 17:39:01 adam Exp $ +# $Id: timing2.sh,v 1.5 2003-05-06 20:09:28 adam Exp $ # Demonstrated that updates depend on file timestamps echo "Testing timings of updates" @@ -64,10 +64,9 @@ grep "^Result count: 9$" log || exit 1 echo "stopping server..." test -f zebrasrv.pid || exit 1 -kill -9 `cat zebrasrv.pid` || exit 1 +kill `cat zebrasrv.pid` || exit 1 rm -f idx.log log timeref[12] rm -f records/esdd000[12].grs rm -f zebrasrv.pid rm -f srv.log -echo ok