-
-
dist-hook:
-mkdir $(distdir)/records
cp $(srcdir)/records/*.grs $(distdir)/records
timing1.sh timing2.sh
EXTRA_DIST = $(TESTS) zebra1.cfg zebra2.cfg
-
-# FIXME:
-# test02.sh fails
-# test03.sh fails with a segfault
-# test01.sh - test start and stop of the server with -1
-#
+#!/bin/sh
+# $Id: stop01.sh,v 1.2 2003-05-06 17:39:01 adam Exp $
+# test start and stop of the server with -1
echo "initializing"
mkdir -p reg
-# test02.sh - test start and stop of the server with -S
+#!/bin/sh
+# $Id: stop02.sh,v 1.2 2003-05-06 17:39:01 adam Exp $
+# test start and stop of the server with -S
#
# FIXME - this test does not currently pass (H 22-oct-2002)
# Something rotten with signals and threads and mutexes...
echo " killing it..."
kill $PID
+sleep 1
echo " checking that it is dead..."
ps -p $PID >/dev/null && exit 1
-# test03.sh - test start and stop of the threaded server (-T)
+#!/bin/sh
+# $Id: stop03.sh,v 1.2 2003-05-06 17:39:01 adam Exp $
+# test start and stop of the threaded server (-T)
#
# FIXME - this test does not currently pass (H 22-oct-2002)
# When the client exits, the process dies with a segfault
-# test04.sh - test start and stop of the forked server
+#!/bin/sh
+# $Id: stop04.sh,v 1.2 2003-05-06 17:39:01 adam Exp $
+# test start and stop of the forked server
#
echo "initializing"
#!/bin/sh
+# $Id: test.sh,v 1.8 2003-05-06 17:39:01 adam Exp $
if [ -x ../../index/zebraidx ]; then
IDX=../../index/zebraidx
SRV=../../index/zebrasrv
+#!/bin/sh
+# $Id: test1.sh,v 1.4 2003-05-06 17:39:01 adam Exp $
echo "testing without stored keys (zebra1.cfg)"
echo "See if servers are running...."
+#!/bin/sh
+# $Id: test2.sh,v 1.4 2003-05-06 17:39:01 adam Exp $
echo "Testing with storekeys (zebra2.cfg)"
echo "init..."
rm -f idx.log log
-# timing1.sh - tests that updates are reflected immediately
-# in the registers. Repeatedly modifies a record and counts hits.
+#!/bin/sh
+# $Id: timing1.sh,v 1.4 2003-05-06 17:39:01 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 "Testing timings of updates"
-# timing2.sh
+#!/bin/sh
+# $Id: timing2.sh,v 1.4 2003-05-06 17:39:01 adam Exp $
# Demonstrated that updates depend on file timestamps
echo "Testing timings of updates"
#!/bin/sh
+# $Id: test.sh,v 1.3 2003-05-06 17:39:01 adam Exp $
test -d tmp || mkdir tmp
test -d lock || mkdir lock
test -d register || mkdir register
#!/bin/sh
+# $Id: test1.sh,v 1.2 2003-05-06 17:39:01 adam Exp $
LOG=test1.log
rm -fr lock
mkdir lock
#!/bin/sh
+# $Id: test.sh,v 1.5 2003-05-06 17:39:01 adam Exp $
test -d tmp || mkdir tmp
test -d lock || mkdir lock
echo Loading Records
-# simple1.sh - test with one simple sgml record
+#!/bin/sh
+# $Id: simple1.sh,v 1.2 2003-05-06 17:39:01 adam Exp $
+# test with one simple sgml record
LOG=simple1.log
../../index/zebraidx -l $LOG init || exit 1
#!/bin/sh
-rm -f test1.log
-../../index/zebraidx -l test1.log init || exit 1
-../../index/zebraidx -l test1.log -t grs.sgml update rec || exit 2
+# $Id: test1.sh,v 1.2 2003-05-06 17:39:01 adam Exp $
+LOG=test1.log
+rm -f $LOG
+../../index/zebraidx -l $LOG init || exit 1
+../../index/zebraidx -l $LOG -t grs.sgml update rec || exit 2
#!/bin/sh
+# $Id: test2.sh,v 1.2 2003-05-06 17:39:01 adam Exp $
LOG=test2.log
TMP=test2.tmp
rm -f $LOG
+rm -f $TMP
+../../index/zebraidx -l $LOG init || exit 1
+../../index/zebraidx -l $LOG -t grs.sgml update rec || exit 2
test -f dict*.mf || exit 1
../../index/zebrasrv -l $LOG -S unix:socket &
sleep 1
kill `cat zebrasrv.pid` || exit 3
cat $TMP >>$LOG
echo 'Checking that result count is 1' >>$LOG
-grep "^Result count: 1$" $TMP || exit 4
+grep "^Result count: 1$" $TMP >/dev/null || exit 4
echo 'Test OK' >>$LOG
#!/bin/sh
+# $Id: test3.sh,v 1.2 2003-05-06 17:39:01 adam Exp $
LOG=test3.log
TMP=test3.tmp
rm -f $LOG
+rm -f $TMP
+../../index/zebraidx -l $LOG init || exit 1
+../../index/zebraidx -l $LOG -t grs.sgml update rec || exit 2
test -f dict*.mf || exit 1
../../index/zebrasrv -l $LOG -S unix:socket &
sleep 1