-# $Id: Makefile.am,v 1.17 2004-01-30 11:43:41 heikki Exp $
+# $Id: Makefile.am,v 1.18 2006-04-27 10:52:26 marc Exp $
dist-hook:
-mkdir $(distdir)/records
TESTS = $(check_SCRIPTS)
-EXTRA_DIST = zebra1.cfg zebra2.cfg $(check_SCRIPTS)
+EXTRA_DIST = cleanrecords.sh zebra1.cfg zebra2.cfg $(check_SCRIPTS)
--- /dev/null
+#!/bin/sh
+# $Id: cleanrecords.sh,v 1.1 2006-04-27 10:52:26 marc Exp $
+
+srcdir=${srcdir:-"."}
+
+# these should not be here, will be created later
+if [ -f $srcdir/records/esdd0001.grs ]
+ then
+ rm -f $srcdir/records/esdd0001.grs
+fi
+if [ -f $srcdir/records/esdd0002.grs ]
+ then
+ rm -f $srcdir/records/esdd0002.grs
+fi
#!/bin/sh
-# $Id: stop01.sh,v 1.11 2005-01-03 09:19:26 adam Exp $
+# $Id: stop01.sh,v 1.12 2006-04-27 10:52:26 marc Exp $
# test start and stop of the server with -1
-pp=${srcdir:-"."}
+srcdir=${srcdir:-"."}
+
+if [ "$srcdir" != "." ]
+ then
+ echo "Jumping over test"
+ exit 0
+fi
LOG=stop01.log
rm -f $LOG
echo "initializing" >>$LOG
test -d reg || mkdir reg
-../../index/zebraidx -l $LOG -c $pp/zebra1.cfg init || exit 1
+../../index/zebraidx -l $LOG -c $srcdir/zebra1.cfg init || exit 1
#create a base to test on
-../../index/zebraidx -l $LOG -c $pp/zebra1.cfg update records || exit 1
+../../index/zebraidx -l $LOG -c $srcdir/zebra1.cfg update records || exit 1
echo "Starting server with -1 (one shot)..." >>$LOG
-../../index/zebrasrv -D -p z.pid -1 -c $pp/zebra1.cfg -l $LOG unix:socket
+../../index/zebrasrv -D -p z.pid -1 -c $srcdir/zebra1.cfg -l $LOG unix:socket
echo " checking that it runs... " >>$LOG
test -f z.pid || exit 1
PID=`cat z.pid`
#!/bin/sh
-# $Id: stop02.sh,v 1.11 2005-01-03 09:19:26 adam Exp $
+# $Id: stop02.sh,v 1.12 2006-04-27 10:52:26 marc Exp $
# test start and stop of the server with -S
-pp=${srcdir:-"."}
+srcdir=${srcdir:-"."}
+
+if [ "$srcdir" != "." ]
+ then
+ echo "Jumping over test"
+ exit 0
+fi
LOG=stop02.log
rm -f $LOG
echo "initializing" >>$LOG
test -d reg || mkdir reg
-../../index/zebraidx -l $LOG -c $pp/zebra1.cfg init || exit 1
+../../index/zebraidx -l $LOG -c $srcdir/zebra1.cfg init || exit 1
#create a base to test on
-../../index/zebraidx -l $LOG -c $pp/zebra1.cfg update records || exit 1
+../../index/zebraidx -l $LOG -c $srcdir/zebra1.cfg update records || exit 1
echo "Starting server with -S (static)..." >>$LOG
-../../index/zebrasrv -D -p z.pid -S -c $pp/zebra1.cfg -l $LOG unix:socket
+../../index/zebrasrv -D -p z.pid -S -c $srcdir/zebra1.cfg -l $LOG unix:socket
echo " checking that it runs... " >>$LOG
test -f z.pid || exit 1
PID=`cat z.pid`
#!/bin/sh
-# $Id: stop03.sh,v 1.11 2005-01-03 12:08:04 adam Exp $
+# $Id: stop03.sh,v 1.12 2006-04-27 10:52:26 marc Exp $
# test start and stop of the threaded server (-T)
-pp=${srcdir:-"."}
+srcdir=${srcdir:-"."}
+
+if [ "$srcdir" != "." ]
+ then
+ echo "Jumping over test"
+ exit 0
+fi
LOG=stop03.log
rm -f $LOG
echo "initializing" >>$LOG
mkdir -p reg
-../../index/zebraidx -l $LOG -c $pp/zebra1.cfg init || exit 1
+../../index/zebraidx -l $LOG -c $srcdir/zebra1.cfg init || exit 1
#create a base to test on
-../../index/zebraidx -l $LOG -c $pp/zebra1.cfg update records || exit 1
+../../index/zebraidx -l $LOG -c $srcdir/zebra1.cfg update records || exit 1
echo "Starting server with -T (threaded)..." >>$LOG
-../../index/zebrasrv -D -p z.pid -T -c $pp/zebra1.cfg -l $LOG unix:socket 2>out
+../../index/zebrasrv -D -p z.pid -T -c $srcdir/zebra1.cfg -l $LOG unix:socket 2>out
if grep 'not available' out >/dev/null; then
test -f z.pid && rm -f z.pid
#!/bin/sh
-# $Id: stop04.sh,v 1.10 2005-01-03 12:08:04 adam Exp $
+# $Id: stop04.sh,v 1.11 2006-04-27 10:52:26 marc Exp $
# test start and stop of the forked server
-pp=${srcdir:-"."}
+srcdir=${srcdir:-"."}
+
+if [ "$srcdir" != "." ]
+ then
+ echo "Jumping over test"
+ exit 0
+fi
LOG=stop04.log
rm -f $LOG
echo "initializing" >>$LOG
mkdir -p reg
-../../index/zebraidx -l $LOG -c $pp/zebra1.cfg init || exit 1
+../../index/zebraidx -l $LOG -c $srcdir/zebra1.cfg init || exit 1
#create a base to test on
-../../index/zebraidx -l $LOG -c $pp/zebra1.cfg update records || exit 1
+../../index/zebraidx -l $LOG -c $srcdir/zebra1.cfg update records || exit 1
echo "Starting server with (forked)..." >>$LOG
-../../index/zebrasrv -D -p z.pid -c $pp/zebra1.cfg -l $LOG unix:socket
+../../index/zebrasrv -D -p z.pid -c $srcdir/zebra1.cfg -l $LOG unix:socket
echo " checking that it runs... " >>$LOG
test -f z.pid || exit 1
#!/bin/sh
-# $Id: test1.sh,v 1.13 2005-01-03 12:08:04 adam Exp $
+# $Id: test1.sh,v 1.14 2006-04-27 10:52:26 marc Exp $
+
+srcdir=${srcdir:-"."}
+
+if [ "$srcdir" != "." ]
+ then
+ echo "Jumping over test"
+ exit 0
+fi
-pp=${srcdir:-"."}
LOG=test1.log
rm -f $LOG
echo "initializing..." >>$LOG
test -d reg || mkdir reg
-rm -f $pp/records/esdd000[12].grs # these should not be here, will be created later
-../../index/zebraidx -l $LOG -c $pp/zebra1.cfg init || exit 1
+
+# these should not be here, will be created later
+$srcdir/cleanrecords.sh
+#if [ -f $srcdir/records/esdd0001.grs ]
+# then
+# rm -f $srcdir/records/esdd0001.grs
+#fi
+#if [ -f $srcdir/records/esdd0002.grs ]
+# then
+# rm -f $srcdir/records/esdd0002.grs
+#fi
+
+../../index/zebraidx -l $LOG -c $srcdir/zebra1.cfg init || exit 1
echo "updating..." >>$LOG
-../../index/zebraidx -l $LOG -c $pp/zebra1.cfg update $pp/records || exit 1
+../../index/zebraidx -l $LOG -c $srcdir/zebra1.cfg update $srcdir/records || exit 1
echo "starting server..." >>$LOG
-../../index/zebrasrv -D -p z.pid -S -c $pp/zebra1.cfg -l $LOG unix:socket
+../../index/zebrasrv -D -p z.pid -S -c $srcdir/zebra1.cfg -l $LOG unix:socket
echo "checking it runs..." >>$LOG
test -f z.pid || exit 1
grep "^Result count: 9$" log >/dev/null || exit 1
echo "reindexing..." >>$LOG
-../../index/zebraidx -l $LOG -c $pp/zebra1.cfg update $pp/records || exit 1
+../../index/zebraidx -l $LOG -c $srcdir/zebra1.cfg update $srcdir/records || exit 1
echo "search 5..." >>$LOG
../api/testclient unix:socket "@attr 1=4 utah" > log || exit 1
#!/bin/sh
-# $Id: test2.sh,v 1.13 2005-01-03 12:08:04 adam Exp $
+# $Id: test2.sh,v 1.14 2006-04-27 10:52:26 marc Exp $
-pp=${srcdir:-"."}
+srcdir=${srcdir:-"."}
+
+if [ "$srcdir" != "." ]
+ then
+ echo "Jumping over test"
+ exit 0
+fi
LOG=test2.log
rm -f $LOG
echo "init..." >>$LOG
-rm -f $pp/records/esdd000[12].grs # these should not be here, will be created later
-../../index/zebraidx -l $LOG -c $pp/zebra2.cfg init || exit 1
+
+# these should not be here, will be created later
+$srcdir/cleanrecords.sh
+
+../../index/zebraidx -l $LOG -c $srcdir/zebra2.cfg init || exit 1
echo "update 1..." >>$LOG
-../../index/zebraidx -l $LOG -c $pp/zebra2.cfg update $pp/records || exit 1
+../../index/zebraidx -l $LOG -c $srcdir/zebra2.cfg update $srcdir/records || exit 1
echo "update 2..." >>$LOG
-../../index/zebraidx -l $LOG -c $pp/zebra2.cfg update $pp/records || exit 1
+../../index/zebraidx -l $LOG -c $srcdir/zebra2.cfg update $srcdir/records || exit 1
echo "killing old server (if any)..." >>$LOG
test -f z.pid && kill -9 `cat z.pid`
echo "starting server..." >>$LOG
-../../index/zebrasrv -D -p z.pid -S -c $pp/zebra2.cfg -l $LOG unix:socket
+../../index/zebrasrv -D -p z.pid -S -c $srcdir/zebra2.cfg -l $LOG unix:socket
test -f z.pid || exit 1
echo "search 1..." >>$LOG
grep "^Result count: 9$" log >/dev/null || exit 1
echo "update 3..." >>$LOG
-../../index/zebraidx -l $LOG -c $pp/zebra2.cfg update $pp/records || exit 1
+../../index/zebraidx -l $LOG -c $srcdir/zebra2.cfg update $srcdir/records || exit 1
echo "search 2..." >>$LOG
../api/testclient unix:socket "@attr 1=4 utah" > log || exit 1
grep "^Result count: 9$" log >/dev/null || exit 1
echo "making test records..." >>$LOG
-cp $pp/records/esdd0006.grs $pp/records/esdd0001.grs
+cp $srcdir/records/esdd0006.grs $srcdir/records/esdd0001.grs
echo "indexing them..." >>$LOG
-../../index/zebraidx -l $LOG -c $pp/zebra2.cfg update $pp/records || exit 1
+../../index/zebraidx -l $LOG -c $srcdir/zebra2.cfg update $srcdir/records || exit 1
echo "search 3..." >>$LOG
../api/testclient unix:socket "@attr 1=4 utah" > log || exit 1
grep "^Result count: 10$" log >/dev/null || exit 1
-touch $pp/records/esdd0001.grs
+touch $srcdir/records/esdd0001.grs
echo "indexing again..." >>$LOG
-../../index/zebraidx -l $LOG -c $pp/zebra2.cfg update $pp/records || exit 1
+../../index/zebraidx -l $LOG -c $srcdir/zebra2.cfg update $srcdir/records || exit 1
echo "search 4..." >>$LOG
../api/testclient unix:socket "@attr 1=4 utah" > log || exit 1
grep "^Result count: 10$" log >/dev/null || exit 1
echo "making another test record..." >>$LOG
-mv $pp/records/esdd0001.grs $pp/records/esdd0002.grs
+mv $srcdir/records/esdd0001.grs $srcdir/records/esdd0002.grs
echo "indexing it too..." >>$LOG
-../../index/zebraidx -l $LOG -c $pp/zebra2.cfg update $pp/records || exit 1
+../../index/zebraidx -l $LOG -c $srcdir/zebra2.cfg update $srcdir/records || exit 1
echo "search 5..." >>$LOG
../api/testclient unix:socket "@attr 1=4 utah" > log || exit 1
sleep 1
echo "modifying a test record..." >>$LOG
-sed 's/UTAH/XYZ/g' <$pp/records/esdd0002.grs >$pp/records/esdd0002x.grs
-mv $pp/records/esdd0002x.grs $pp/records/esdd0002.grs
+sed 's/UTAH/XYZ/g' <$srcdir/records/esdd0002.grs >$srcdir/records/esdd0002x.grs
+mv $srcdir/records/esdd0002x.grs $srcdir/records/esdd0002.grs
echo "indexing it..." >>$LOG
-../../index/zebraidx -l $LOG -c $pp/zebra2.cfg update $pp/records || exit 1
+../../index/zebraidx -l $LOG -c $srcdir/zebra2.cfg update $srcdir/records || exit 1
sleep 1
echo "search 6..." >>$LOG
../api/testclient unix:socket "@attr 1=4 xyz" > log || exit 1
grep "^Result count: 1$" log >/dev/null || exit 1
-echo "stopping server..." >>$LOG
+echo "stosrcdiring server..." >>$LOG
test -f z.pid || exit 1
kill `cat z.pid` || exit 1
rm -f log
-rm -f $pp/records/esdd000[12].grs
+$srcdir/cleanrecords.sh
rm -f z.pid
#!/bin/sh
-# $Id: test3.sh,v 1.7 2005-01-03 12:08:04 adam Exp $
+# $Id: test3.sh,v 1.8 2006-04-27 10:52:26 marc Exp $
# Testing searches with lots of @and operators
# in order to test the fast-forward operation of rsets
-pp=${srcdir:-"."}
+srcdir=${srcdir:-"."}
+
+if [ "$srcdir" != "." ]
+ then
+ echo "Jumping over test"
+ exit 0
+fi
LOG=test3.log
DBG="-v 1647"
rm -f $LOG
+# these should not be here, will be created later
+$srcdir/cleanrecords.sh
+
echo "initializing..." >>$LOG
mkdir -p reg
-../../index/zebraidx -l $LOG -c $pp/zebra1.cfg init || exit 1
+../../index/zebraidx -l $LOG -c $srcdir/zebra1.cfg init || exit 1
echo "updating..." >>$LOG
-../../index/zebraidx -l $LOG -c $pp/zebra1.cfg update $pp/records || exit 1
+../../index/zebraidx -l $LOG -c $srcdir/zebra1.cfg update $srcdir/records || exit 1
echo "starting server..." >>$LOG
-../../index/zebrasrv -D -p z.pid -S -c $pp/zebra1.cfg $DBG -l $LOG unix:socket
+../../index/zebrasrv -D -p z.pid -S -c $srcdir/zebra1.cfg $DBG -l $LOG unix:socket
echo "checking it runs..." >>$LOG
test -f z.pid || exit 1
#!/bin/sh
-# $Id: timing1.sh,v 1.12 2005-01-03 12:08:04 adam Exp $
+# $Id: timing1.sh,v 1.13 2006-04-27 10:52:27 marc 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
-pp=${srcdir:-"."}
+srcdir=${srcdir:-"."}
+
+if [ "$srcdir" != "." ]
+ then
+ echo "Jumping over test"
+ exit 0
+fi
LOG=timing1.log
rm -f $LOG
echo " init..." >>$LOG
-rm -f $pp/records/esdd000[12].grs # these should not be here, will be created later
-../../index/zebraidx -c $pp/zebra2.cfg -l $LOG init || exit 1
+
+# these should not be here, will be created later
+$srcdir/cleanrecords.sh
+
+
+../../index/zebraidx -c $srcdir/zebra2.cfg -l $LOG init || exit 1
echo " starting server..." >>$LOG
-../../index/zebrasrv -D -p z.pid -S -c $pp/zebra2.cfg -l $LOG unix:socket
+../../index/zebrasrv -D -p z.pid -S -c $srcdir/zebra2.cfg -l $LOG unix:socket
test -f z.pid || exit 1
sleep 2
echo " update 1..." >>$LOG
-../../index/zebraidx -l $LOG -c $pp/zebra2.cfg update $pp/records || exit 1
+../../index/zebraidx -l $LOG -c $srcdir/zebra2.cfg update $srcdir/records || exit 1
sleep 2
echo " search 1..." >>$LOG
sleep 2
echo "making a test record..." >>$LOG
-cp $pp/records/esdd0006.grs $pp/records/esdd0002.grs
+cp $srcdir/records/esdd0006.grs $srcdir/records/esdd0002.grs
echo " indexing it..." >>$LOG
-../../index/zebraidx -l $LOG -c $pp/zebra2.cfg update $pp/records || exit 1
+../../index/zebraidx -l $LOG -c $srcdir/zebra2.cfg update $srcdir/records || exit 1
sleep 2
echo " search 2..." >>$LOG
sleep 2
echo " 1a: modifying a test record (xyz)..." >>$LOG
-sed 's/UTAH/XYZ/g' <$pp/records/esdd0002.grs >$pp/records/esdd0002x.grs
-mv $pp/records/esdd0002x.grs $pp/records/esdd0002.grs
+sed 's/UTAH/XYZ/g' <$srcdir/records/esdd0002.grs >$srcdir/records/esdd0002x.grs
+mv $srcdir/records/esdd0002x.grs $srcdir/records/esdd0002.grs
echo " indexing it..." >>$LOG
-../../index/zebraidx -l $LOG -c $pp/zebra2.cfg update $pp/records || exit 1
+../../index/zebraidx -l $LOG -c $srcdir/zebra2.cfg update $srcdir/records || exit 1
sleep 2
echo " search 3..." >>$LOG
sleep 2
echo " 1b: modifying the test record back (utah)..." >>$LOG
-sed 's/XYZ/UTAH/g' <$pp/records/esdd0002.grs >$pp/records/esdd0002x.grs
-mv $pp/records/esdd0002x.grs $pp/records/esdd0002.grs
+sed 's/XYZ/UTAH/g' <$srcdir/records/esdd0002.grs >$srcdir/records/esdd0002x.grs
+mv $srcdir/records/esdd0002x.grs $srcdir/records/esdd0002.grs
echo " indexing it..." >>$LOG
-../../index/zebraidx -l $LOG -c $pp/zebra2.cfg update $pp/records || exit 1
+../../index/zebraidx -l $LOG -c $srcdir/zebra2.cfg update $srcdir/records || exit 1
sleep 2
echo " search 4..." >>$LOG
sleep 2
echo " 2a: modifying the test record (xyz)..." >>$LOG
-sed 's/UTAH/XYZ/g' <$pp/records/esdd0002.grs >$pp/records/esdd0002x.grs
-mv $pp/records/esdd0002x.grs $pp/records/esdd0002.grs
+sed 's/UTAH/XYZ/g' <$srcdir/records/esdd0002.grs >$srcdir/records/esdd0002x.grs
+mv $srcdir/records/esdd0002x.grs $srcdir/records/esdd0002.grs
echo " indexing it..." >>$LOG
-../../index/zebraidx -l $LOG -c $pp/zebra2.cfg update $pp/records || exit 1
+../../index/zebraidx -l $LOG -c $srcdir/zebra2.cfg update $srcdir/records || exit 1
sleep 2
echo " search 5..." >>$LOG
sleep 2
echo " 2b: modifying the test record back (utah)..." >>$LOG
-sed 's/XYZ/UTAH/g' <$pp/records/esdd0002.grs >$pp/records/esdd0002x.grs
-mv $pp/records/esdd0002x.grs $pp/records/esdd0002.grs
+sed 's/XYZ/UTAH/g' <$srcdir/records/esdd0002.grs >$srcdir/records/esdd0002x.grs
+mv $srcdir/records/esdd0002x.grs $srcdir/records/esdd0002.grs
sleep 2
echo " indexing it..." >>$LOG
-../../index/zebraidx -l $LOG -c $pp/zebra2.cfg update $pp/records || exit 1
+../../index/zebraidx -l $LOG -c $srcdir/zebra2.cfg update $srcdir/records || exit 1
sleep 2
echo " search 6..." >>$LOG
sleep 2
echo " 3a: modifying the test record (xyz)..." >>$LOG
-sed 's/UTAH/XYZ/g' <$pp/records/esdd0002.grs >$pp/records/esdd0002x.grs
-mv $pp/records/esdd0002x.grs $pp/records/esdd0002.grs
+sed 's/UTAH/XYZ/g' <$srcdir/records/esdd0002.grs >$srcdir/records/esdd0002x.grs
+mv $srcdir/records/esdd0002x.grs $srcdir/records/esdd0002.grs
sleep 2
echo " indexing it..." >>$LOG
-../../index/zebraidx -l $LOG -c $pp/zebra2.cfg update $pp/records || exit 1
+../../index/zebraidx -l $LOG -c $srcdir/zebra2.cfg update $srcdir/records || exit 1
sleep 2
echo " search 7..." >>$LOG
sleep 2
echo " 3b: modifying the test record back (utah)..." >>$LOG
-sed 's/XYZ/UTAH/g' <$pp/records/esdd0002.grs >$pp/records/esdd0002x.grs
-mv $pp/records/esdd0002x.grs $pp/records/esdd0002.grs
+sed 's/XYZ/UTAH/g' <$srcdir/records/esdd0002.grs >$srcdir/records/esdd0002x.grs
+mv $srcdir/records/esdd0002x.grs $srcdir/records/esdd0002.grs
echo " indexing it..." >>$LOG
-../../index/zebraidx -l $LOG -c $pp/zebra2.cfg update $pp/records || exit 1
+../../index/zebraidx -l $LOG -c $srcdir/zebra2.cfg update $srcdir/records || exit 1
sleep 2
echo " search 8..." >>$LOG
test -f z.pid || exit 1
kill `cat z.pid` || exit 1
rm -f log
-rm -f $pp/records/esdd000[12].grs
+$srcdir/cleanrecords.sh
rm -f z.pid
#!/bin/sh
-# $Id: timing2.sh,v 1.12 2005-01-03 12:08:04 adam Exp $
+# $Id: timing2.sh,v 1.13 2006-04-27 10:52:27 marc Exp $
# Demonstrated that updates depend on file timestamps
-pp=${srcdir:-"."}
+srcdir=${srcdir:-"."}
+
+if [ "$srcdir" != "." ]
+ then
+ echo "Jumping over test"
+ exit 0
+fi
LOG=timing2.log
echo " init..." >>$LOG
rm -f log timeref[12]
-rm -f $pp/records/esdd000[12].grs # these should not be here, will be created later
-../../index/zebraidx -c $pp/zebra2.cfg -l $LOG init || exit 1
+# these should not be here, will be created later
+$srcdir/cleanrecords.sh
+
+../../index/zebraidx -c $srcdir/zebra2.cfg -l $LOG init || exit 1
touch timeref1 # make an early timestamp
echo " starting server..." >>$LOG
-../../index/zebrasrv -D -p z.pid -S -c $pp/zebra2.cfg -l $LOG unix:socket
+../../index/zebrasrv -D -p z.pid -S -c $srcdir/zebra2.cfg -l $LOG unix:socket
test -f z.pid || exit 1
sleep 1
touch timeref2 # make a later timestamp
echo " update 1..." >>$LOG
-../../index/zebraidx -l $LOG -c $pp/zebra2.cfg update $pp/records || exit 1
+../../index/zebraidx -l $LOG -c $srcdir/zebra2.cfg update $srcdir/records || exit 1
echo " search 1..." >>$LOG
../api/testclient unix:socket "@attr 1=4 utah" > log || exit 1
grep "^Result count: 9$" log >/dev/null || exit 1
echo "making a test record..." >>$LOG
-cp $pp/records/esdd0006.grs $pp/records/esdd0002.grs
-touch -r timeref1 $pp/records/esdd0002.grs
+cp $srcdir/records/esdd0006.grs $srcdir/records/esdd0002.grs
+touch -r timeref1 $srcdir/records/esdd0002.grs
echo " indexing it..." >>$LOG
-../../index/zebraidx -l $LOG -c $pp/zebra2.cfg update $pp/records || exit 1
+../../index/zebraidx -l $LOG -c $srcdir/zebra2.cfg update $srcdir/records || exit 1
echo " search 2..." >>$LOG
../api/testclient unix:socket "@attr 1=4 utah" > log || exit 1
grep "^Result count: 10$" log >/dev/null || exit 1
echo " modifying a test record (xyz)..." >>$LOG
-sed 's/UTAH/XYZ/g' <$pp/records/esdd0002.grs >$pp/records/esdd0002x.grs
-mv $pp/records/esdd0002x.grs $pp/records/esdd0002.grs
-touch -r timeref1 $pp/records/esdd0002.grs # reset timestamp to 'early'
+sed 's/UTAH/XYZ/g' <$srcdir/records/esdd0002.grs >$srcdir/records/esdd0002x.grs
+mv $srcdir/records/esdd0002x.grs $srcdir/records/esdd0002.grs
+touch -r timeref1 $srcdir/records/esdd0002.grs # reset timestamp to 'early'
echo " not indexing it..." >>$LOG
-../../index/zebraidx -l $LOG -c $pp/zebra2.cfg update $pp/records || exit 1
+../../index/zebraidx -l $LOG -c $srcdir/zebra2.cfg update $srcdir/records || exit 1
echo " search 3..." >>$LOG
../api/testclient unix:socket "@attr 1=4 utah" > log || exit 1
grep "^Result count: 10$" log >/dev/null || exit 1
echo " touching its timestamp..." >>$LOG
-touch -r timeref2 $pp/records/esdd0002.grs # set timestamp to 'late'
+touch -r timeref2 $srcdir/records/esdd0002.grs # set timestamp to 'late'
echo " indexing it..." >>$LOG
-../../index/zebraidx -l $LOG -c $pp/zebra2.cfg update $pp/records || exit 1
+../../index/zebraidx -l $LOG -c $srcdir/zebra2.cfg update $srcdir/records || exit 1
echo " search 4..." >>$LOG
../api/testclient unix:socket "@attr 1=4 utah" > log || 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
+$srcdir/cleanrecords.sh
rm -f z.pid
#!/bin/sh
-# $Id: testall.sh,v 1.4 2004-06-15 09:43:34 adam Exp $
+# $Id: testall.sh,v 1.5 2006-04-27 10:52:27 marc Exp $
# run all zebrash tests
-pp=${srcdir:-"."}
+srcdir=${srcdir:-"."}
+
test -d reg || mkdir reg
rm -f *.mf reg/*.mf *.out
-for F in $pp/*.zsh
+for F in $srcdir/*.zsh
do
echo $F
- ../../index/zebrash -c $pp/zebra.cfg <$F >$F.out
+ if [ "." == $srcdir ]
+ then # running make check
+ ../../index/zebrash -c $srcdir/zebra.cfg <$F >$F.out
+ else # running make distcheck
+ ../../index/zebrash -c $srcdir/zebra.cfg <$F >/dev/null
+ fi
RC=$?
if [ "$RC" -gt "0" ]
- then
- echo "$F failed with exit code $RC"
- FINAL=$RC
+ then
+ echo "$F failed with exit code $RC"
+ FINAL=$RC
fi
done
if [ "$FINAL" ]