#!/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"
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
#!/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)
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 &
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
#!/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)
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 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
#!/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
#
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 &
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
#!/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..."
kill `cat zebrasrv.pid` || exit 1
rm -f zebrasrv.pid
-echo "ok"
#!/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
rm -f records/esdd000[12].grs
rm -f zebrasrv.pid
rm -f srv.log
-
-echo ok
#!/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
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
#!/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"
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