#!/bin/sh
-# $Id: test3.sh,v 1.3 2004-06-15 08:06:34 adam Exp $
+# $Id: test3.sh,v 1.6 2005-01-03 09:19:26 adam Exp $
# Testing searches with lots of @and operators
# in order to test the fast-forward operation of rsets
DBG="-v 1647"
rm -f $LOG
-echo "killing old server (if any)..." >>$LOG
-test -f zebrasrv.pid && kill `cat zebrasrv.pid`
-rm -f zebrasrv.pid
echo "initializing..." >>$LOG
mkdir -p reg
../../index/zebraidx -l $LOG -c $pp/zebra1.cfg init || exit 1
echo "updating..." >>$LOG
-../../index/zebraidx -l $LOG -c $pp/zebra1.cfg update records || exit 1
+../../index/zebraidx -l $LOG -c $pp/zebra1.cfg update $pp/records || exit 1
echo "starting server..." >>$LOG
-../../index/zebrasrv -S -c $pp/zebra1.cfg $DBG -l $LOG tcp:@:9901 &
-sleep 1
+../../index/zebrasrv -D -p z.pid -S -c $pp/zebra1.cfg $DBG -l $LOG tcp:@:9901
echo "checking it runs..." >>$LOG
-test -f zebrasrv.pid || exit 1
+test -f z.pid || exit 1
echo "search A1..." >>$LOG
../api/testclient -c 17 localhost:9901 utah > log || exit 1
echo "stopping server..." >>$LOG
-test -f zebrasrv.pid || exit 1
-kill `cat zebrasrv.pid` || exit 1
-rm -f zebrasrv.pid
+test -f z.pid || exit 1
+kill `cat z.pid` || exit 1
+rm -f z.pid
sleep 1
echo "Test successfully completed" >>$LOG