#!/bin/sh
-# $Id: timing2.sh,v 1.9 2004-06-15 09:43:30 adam Exp $
+# $Id: timing2.sh,v 1.10 2005-01-02 23:21:31 adam Exp $
# Demonstrated that updates depend on file timestamps
pp=${srcdir:-"."}
../../index/zebraidx -c $pp/zebra2.cfg -l $LOG init || exit 1
touch timeref1 # make an early timestamp
-echo " killing old server (if any)..." >>$LOG
-test -f zebrasrv.pid && kill -9 `cat zebrasrv.pid`
-
echo " starting server..." >>$LOG
-../../index/zebrasrv -S -c $pp/zebra2.cfg -l $LOG tcp:@:9901 &
+../../index/zebrasrv -D -p z.pid -S -c $pp/zebra2.cfg -l $LOG tcp:@:9901
sleep 1
-test -f zebrasrv.pid || exit 1
+test -f z.pid || exit 1
touch timeref2 # make a later timestamp
echo " update 1..." >>$LOG
grep "^Result count: 9$" log >/dev/null || exit 1
echo "stopping server..." >>$LOG
-test -f zebrasrv.pid || exit 1
-kill `cat zebrasrv.pid` || exit 1
+test -f z.pid || exit 1
+kill `cat z.pid` || exit 1
rm -f log timeref[12]
rm -f $pp/records/esdd000[12].grs
-rm -f zebrasrv.pid
+rm -f z.pid