From: Adam Dickmeiss Date: Tue, 6 May 2003 17:39:01 +0000 (+0000) Subject: Updated tests X-Git-Tag: ZEBRA.1.3.12~67 X-Git-Url: http://git.indexdata.com/?p=idzebra-moved-to-github.git;a=commitdiff_plain;h=e93e9d110b6bb2596e011de5fb0c8825ac2fe2b2 Updated tests --- diff --git a/test/gils/Makefile.am b/test/gils/Makefile.am index f086103..6a0ba44 100644 --- a/test/gils/Makefile.am +++ b/test/gils/Makefile.am @@ -1,5 +1,3 @@ - - dist-hook: -mkdir $(distdir)/records cp $(srcdir)/records/*.grs $(distdir)/records @@ -9,7 +7,3 @@ TESTS = stop01.sh stop02.sh stop03.sh stop04.sh \ timing1.sh timing2.sh EXTRA_DIST = $(TESTS) zebra1.cfg zebra2.cfg - -# FIXME: -# test02.sh fails -# test03.sh fails with a segfault diff --git a/test/gils/stop01.sh b/test/gils/stop01.sh index 4c70b97..f1b52c1 100755 --- a/test/gils/stop01.sh +++ b/test/gils/stop01.sh @@ -1,5 +1,6 @@ -# 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 diff --git a/test/gils/stop02.sh b/test/gils/stop02.sh index 996feeb..d9de692 100755 --- a/test/gils/stop02.sh +++ b/test/gils/stop02.sh @@ -1,4 +1,6 @@ -# 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... @@ -39,6 +41,7 @@ sleep 1 # let the client connect echo " killing it..." kill $PID +sleep 1 echo " checking that it is dead..." ps -p $PID >/dev/null && exit 1 diff --git a/test/gils/stop03.sh b/test/gils/stop03.sh index fe33d0c..23c766c 100755 --- a/test/gils/stop03.sh +++ b/test/gils/stop03.sh @@ -1,4 +1,6 @@ -# 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 diff --git a/test/gils/stop04.sh b/test/gils/stop04.sh index e66991c..2b06077 100755 --- a/test/gils/stop04.sh +++ b/test/gils/stop04.sh @@ -1,4 +1,6 @@ -# 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" diff --git a/test/gils/test.sh b/test/gils/test.sh index bba92f4..bb6f324 100755 --- a/test/gils/test.sh +++ b/test/gils/test.sh @@ -1,4 +1,5 @@ #!/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 diff --git a/test/gils/test1.sh b/test/gils/test1.sh index e33ccff..b479a39 100755 --- a/test/gils/test1.sh +++ b/test/gils/test1.sh @@ -1,3 +1,5 @@ +#!/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...." diff --git a/test/gils/test2.sh b/test/gils/test2.sh index 16d22d6..69c0af9 100755 --- a/test/gils/test2.sh +++ b/test/gils/test2.sh @@ -1,3 +1,5 @@ +#!/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 diff --git a/test/gils/timing1.sh b/test/gils/timing1.sh index 1f373f7..5fd284d 100755 --- a/test/gils/timing1.sh +++ b/test/gils/timing1.sh @@ -1,5 +1,7 @@ -# 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" diff --git a/test/gils/timing2.sh b/test/gils/timing2.sh index fa90ca5..54a1974 100755 --- a/test/gils/timing2.sh +++ b/test/gils/timing2.sh @@ -1,4 +1,5 @@ -# 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" diff --git a/test/rusmarc/test.sh b/test/rusmarc/test.sh index 4f71be2..c924b19 100755 --- a/test/rusmarc/test.sh +++ b/test/rusmarc/test.sh @@ -1,4 +1,5 @@ #!/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 diff --git a/test/sort/test1.sh b/test/sort/test1.sh index 62b428a..2e98061 100755 --- a/test/sort/test1.sh +++ b/test/sort/test1.sh @@ -1,4 +1,5 @@ #!/bin/sh +# $Id: test1.sh,v 1.2 2003-05-06 17:39:01 adam Exp $ LOG=test1.log rm -fr lock mkdir lock diff --git a/test/usmarc/test.sh b/test/usmarc/test.sh index 48c8ee7..e506dca 100755 --- a/test/usmarc/test.sh +++ b/test/usmarc/test.sh @@ -1,4 +1,5 @@ #!/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 diff --git a/test/xpath/simple1.sh b/test/xpath/simple1.sh index 7fdd94f..9c7dc55 100755 --- a/test/xpath/simple1.sh +++ b/test/xpath/simple1.sh @@ -1,4 +1,6 @@ -# 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 diff --git a/test/xpath/test1.sh b/test/xpath/test1.sh index 5806a0a..9986e35 100755 --- a/test/xpath/test1.sh +++ b/test/xpath/test1.sh @@ -1,4 +1,6 @@ #!/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 diff --git a/test/xpath/test2.sh b/test/xpath/test2.sh index d6df208..6b54af7 100755 --- a/test/xpath/test2.sh +++ b/test/xpath/test2.sh @@ -1,7 +1,11 @@ #!/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 @@ -11,6 +15,6 @@ echo 'Killing server' >>$LOG 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 diff --git a/test/xpath/test3.sh b/test/xpath/test3.sh index 3b0145d..b37859e 100755 --- a/test/xpath/test3.sh +++ b/test/xpath/test3.sh @@ -1,7 +1,11 @@ #!/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