2 # test start and stop of the server with -1
6 if [ "$srcdir" != "." ]
8 echo "Jumping over test"
15 echo "initializing" >>$LOG
16 test -d reg || mkdir reg
17 ../../index/zebraidx -l $LOG -c $srcdir/zebra1.cfg init || exit 1
19 #create a base to test on
20 ../../index/zebraidx -l $LOG -c $srcdir/zebra1.cfg update records || exit 1
22 echo "Starting server with -1 (one shot)..." >>$LOG
23 ../../index/zebrasrv -D -p z.pid -1 -c $srcdir/zebra1.cfg -l $LOG unix:socket
24 echo " checking that it runs... " >>$LOG
25 test -f z.pid || exit 1
27 kill -CHLD $PID >/dev/null 2>&1 || exit 1
29 echo " connecting to it..." >>$LOG
30 ../api/testclient unix:socket utah >>$LOG || exit 1
32 echo " checking that server does not run any more" >>$LOG
33 kill -CHLD $PID >/dev/null 2>&1 && sleep 1 && \
34 kill -CHLD $PID >/dev/null 2>&1 && exit 1