From 3038982ea4d46e1562a4e88029199ca09153a839 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Tue, 15 Jun 2004 08:06:33 +0000 Subject: [PATCH] More updates to allow tests when builddir != srcdir. --- test/api/zebra.cfg | 4 ++-- test/charmap/test1.sh | 12 ++++++++---- test/charmap/test2.sh | 12 ++++++++---- test/config/test1.sh | 8 ++++++-- test/config/test2.sh | 11 ++++++++--- test/config/zebra.cfg | 4 ++-- test/gils/stop03.sh | 10 ++++++---- test/gils/stop04.sh | 10 ++++++---- test/gils/test1.sh | 12 +++++++----- test/gils/test2.sh | 22 ++++++++++++---------- test/gils/test3.sh | 12 +++++++----- test/gils/timing1.sh | 24 +++++++++++++----------- test/gils/timing2.sh | 16 +++++++++------- test/gils/zebra1.cfg | 4 ++-- test/gils/zebra2.cfg | 4 ++-- test/malxml/test1.sh | 9 +++++++-- test/malxml/zebra.cfg | 4 ++-- test/marcxml/test1.sh | 12 ++++++++---- test/marcxml/test2.sh | 10 +++++++--- test/rusmarc/test1.sh | 11 +++++++---- test/sort/test1.sh | 9 ++++++--- test/usmarc/zebra.cfg | 4 ++-- test/xpath/test1.sh | 9 ++++++--- test/xpath/test2.sh | 11 +++++++---- test/xpath/test3.sh | 11 +++++++---- test/xpath/test4.sh | 11 +++++++---- test/xpath/test5.sh | 11 +++++++---- test/zsh/testall.sh | 8 ++++++-- 28 files changed, 177 insertions(+), 108 deletions(-) diff --git a/test/api/zebra.cfg b/test/api/zebra.cfg index 070f077..354a1c2 100644 --- a/test/api/zebra.cfg +++ b/test/api/zebra.cfg @@ -1,5 +1,5 @@ -# $Id: zebra.cfg,v 1.2 2004-06-14 23:43:32 adam Exp $ -profilepath: ../../tab:${srcdir}/../../tab +# $Id: zebra.cfg,v 1.3 2004-06-15 08:06:33 adam Exp $ +profilepath: ${srcdir:-.}/../../tab attset: bib1.att diff --git a/test/charmap/test1.sh b/test/charmap/test1.sh index 501057d..bb8e1a2 100755 --- a/test/charmap/test1.sh +++ b/test/charmap/test1.sh @@ -1,13 +1,17 @@ #!/bin/sh +# $id$ + +pp=${srcdir:-"."} + LOG=test1.log rm -f $LOG -if ../../index/zebraidx -l $LOG -V|grep Expat >/dev/null; then - ../../index/zebraidx -l$LOG init +if ../../index/zebraidx -c $pp/zebra.cfg -l $LOG -V|grep Expat >/dev/null; then + ../../index/zebraidx -c $pp/zebra.cfg -l$LOG init else exit 0 fi -../../index/zebraidx -l$LOG update *.xml -../../index/zebrasrv -l$LOG unix:socket & +../../index/zebraidx -c $pp/zebra.cfg -l$LOG update *.xml +../../index/zebrasrv -c $pp/zebra.cfg -l$LOG unix:socket & sleep 1 ../api/testclient unix:socket '@term string æ' >tmp1 echo 'Result count: 1' >tmp2 diff --git a/test/charmap/test2.sh b/test/charmap/test2.sh index 2b7861c..c704c9f 100755 --- a/test/charmap/test2.sh +++ b/test/charmap/test2.sh @@ -1,13 +1,17 @@ #!/bin/sh +# $id$ + +pp=${srcdir:-"."} + LOG=test2.log rm -f $LOG -if ../../index/zebraidx -l $LOG -V|grep Expat >/dev/null; then - ../../index/zebraidx -l$LOG init +if ../../index/zebraidx -c $pp/zebra.cfg -l $LOG -V|grep Expat >/dev/null; then + ../../index/zebraidx -c $pp/zebra.cfg -l$LOG init else exit 0 fi -../../index/zebraidx -l$LOG update *.xml -../../index/zebrasrv -l$LOG unix:socket & +../../index/zebraidx -c $pp/zebra.cfg -l$LOG update *.xml +../../index/zebrasrv -c $pp/zebra.cfg -l$LOG unix:socket & sleep 1 # search for UNICODE 1E25 - letter h with dot below ../api/testclient unix:socket '@term string ḥ' >tmp1 diff --git a/test/config/test1.sh b/test/config/test1.sh index 8a1b546..0c581bd 100755 --- a/test/config/test1.sh +++ b/test/config/test1.sh @@ -1,4 +1,8 @@ #!/bin/sh +# $Id: test1.sh,v 1.3 2004-06-15 08:06:34 adam Exp $ + +pp=${srcdir:-"."} + LOG=test1.log -../../index/zebraidx -l $LOG init -../../index/zebraidx -l $LOG update g.rec +../../index/zebraidx -c $pp/zebra.cfg -l $LOG init +../../index/zebraidx -c $pp/zebra.cfg -l $LOG update g.rec diff --git a/test/config/test2.sh b/test/config/test2.sh index 0557c8e..4192337 100755 --- a/test/config/test2.sh +++ b/test/config/test2.sh @@ -1,8 +1,13 @@ #!/bin/sh +# $Id: test2.sh,v 1.3 2004-06-15 08:06:34 adam Exp $ + +pp=${srcdir:-"."} + LOG=test2.log -if ../../index/zebraidx -l $LOG -V|grep Tcl >/dev/null; then - ../../index/zebraidx -l $LOG init - ../../index/zebraidx -l $LOG -s -t grs.tcl.m update m.rec | grep tag:dc:subject >/dev/null + +if ../../index/zebraidx -c $pp/zebra.cfg -l $LOG -V|grep Tcl >/dev/null; then + ../../index/zebraidx -c $pp/zebra.cfg -l $LOG init + ../../index/zebraidx -c $pp/zebra.cfg -l $LOG -s -t grs.tcl.m update m.rec | grep tag:dc:subject >/dev/null else exit 0 fi diff --git a/test/config/zebra.cfg b/test/config/zebra.cfg index 486d510..3c5891c 100644 --- a/test/config/zebra.cfg +++ b/test/config/zebra.cfg @@ -1,8 +1,8 @@ # Simple Zebra configuration file -# $Id: zebra.cfg,v 1.1 2003-09-16 12:18:25 adam Exp $ +# $Id: zebra.cfg,v 1.2 2004-06-15 08:06:34 adam Exp $ # # Where the schema files, attribute files, etc are located. -profilePath: .:../../tab +profilePath: ${srcdir:-.}:${srcdir:-.}/../../tab # Files that describe the attribute sets supported. attset: bib1.att diff --git a/test/gils/stop03.sh b/test/gils/stop03.sh index f28a7b0..7afed30 100755 --- a/test/gils/stop03.sh +++ b/test/gils/stop03.sh @@ -1,23 +1,25 @@ #!/bin/sh -# $Id: stop03.sh,v 1.6 2003-09-24 11:45:44 adam Exp $ +# $Id: stop03.sh,v 1.7 2004-06-15 08:06:34 adam Exp $ # test start and stop of the threaded server (-T) +pp=${srcdir:-"."} + LOG=stop03.log rm -f $LOG echo "initializing" >>$LOG mkdir -p reg -../../index/zebraidx -l $LOG -c zebra1.cfg init || exit 1 +../../index/zebraidx -l $LOG -c $pp/zebra1.cfg init || exit 1 #create a base to test on -../../index/zebraidx -l $LOG -c zebra1.cfg update records || exit 1 +../../index/zebraidx -l $LOG -c $pp/zebra1.cfg update records || exit 1 #kill old server (if any) test -f zebrasrv.pid && kill -9 `cat zebrasrv.pid` echo "Starting server with -T (threaded)..." >>$LOG ( - ../../index/zebrasrv -T -c zebra1.cfg -l $LOG tcp:@:9901 2>out || + ../../index/zebrasrv -T -c $pp/zebra1.cfg -l $LOG tcp:@:9901 2>out || echo "server failed with $?" > $LOG )& sleep 1 diff --git a/test/gils/stop04.sh b/test/gils/stop04.sh index c4da958..10bde11 100755 --- a/test/gils/stop04.sh +++ b/test/gils/stop04.sh @@ -1,22 +1,24 @@ #!/bin/sh -# $Id: stop04.sh,v 1.5 2003-05-24 22:34:48 adam Exp $ +# $Id: stop04.sh,v 1.6 2004-06-15 08:06:34 adam Exp $ # test start and stop of the forked server +pp=${srcdir:-"."} + LOG=stop04.log rm -f $LOG echo "initializing" >>$LOG mkdir -p reg -../../index/zebraidx -l $LOG -c zebra1.cfg init || exit 1 +../../index/zebraidx -l $LOG -c $pp/zebra1.cfg init || exit 1 #create a base to test on -../../index/zebraidx -l $LOG -c zebra1.cfg update records || exit 1 +../../index/zebraidx -l $LOG -c $pp/zebra1.cfg update records || exit 1 #kill old server (if any) test -f zebrasrv.pid && kill -9 `cat zebrasrv.pid` echo "Starting server with (forked)..." >>$LOG -../../index/zebrasrv -c zebra1.cfg -l $LOG tcp:@:9901 & +../../index/zebrasrv -c $pp/zebra1.cfg -l $LOG tcp:@:9901 & sleep 1 echo " checking that it runs... " >>$LOG diff --git a/test/gils/test1.sh b/test/gils/test1.sh index 5ee2b23..d1991be 100755 --- a/test/gils/test1.sh +++ b/test/gils/test1.sh @@ -1,5 +1,7 @@ #!/bin/sh -# $Id: test1.sh,v 1.7 2003-05-24 22:34:48 adam Exp $ +# $Id: test1.sh,v 1.8 2004-06-15 08:06:34 adam Exp $ + +pp=${srcdir:-"."} LOG=test1.log @@ -7,16 +9,16 @@ rm -f $LOG echo "initializing..." >>$LOG mkdir -p reg rm -f records/esdd000[12].grs # these should not be here, will be created later -../../index/zebraidx -l $LOG -c zebra1.cfg init || exit 1 +../../index/zebraidx -l $LOG -c $pp/zebra1.cfg init || exit 1 echo "updating..." >>$LOG -../../index/zebraidx -l $LOG -c zebra1.cfg update records || exit 1 +../../index/zebraidx -l $LOG -c $pp/zebra1.cfg update records || exit 1 echo "killing old server (if any)..." >>$LOG test -f zebrasrv.pid && kill `cat zebrasrv.pid` echo "starting server..." >>$LOG -../../index/zebrasrv -S -c zebra1.cfg -l $LOG tcp:@:9901 & +../../index/zebrasrv -S -c $pp/zebra1.cfg -l $LOG tcp:@:9901 & sleep 1 echo "checking it runs..." >>$LOG @@ -39,7 +41,7 @@ echo "search 4..." >>$LOG grep "^Result count: 9$" log >/dev/null || exit 1 echo "reindexing..." >>$LOG -../../index/zebraidx -l $LOG -c zebra1.cfg update records || exit 1 +../../index/zebraidx -l $LOG -c $pp/zebra1.cfg update records || exit 1 echo "search 5..." >>$LOG ../api/testclient localhost:9901 "@attr 1=4 utah" > log || exit 1 diff --git a/test/gils/test2.sh b/test/gils/test2.sh index 951c6ba..379c665 100755 --- a/test/gils/test2.sh +++ b/test/gils/test2.sh @@ -1,24 +1,26 @@ #!/bin/sh -# $Id: test2.sh,v 1.7 2003-05-24 22:34:48 adam Exp $ +# $Id: test2.sh,v 1.8 2004-06-15 08:06:34 adam Exp $ + +pp=${srcdir:-"."} LOG=test2.log rm -f $LOG echo "init..." >>$LOG rm -f records/esdd000[12].grs # these should not be here, will be created later -../../index/zebraidx -l $LOG -c zebra2.cfg init || exit 1 +../../index/zebraidx -l $LOG -c $pp/zebra2.cfg init || exit 1 echo "update 1..." >>$LOG -../../index/zebraidx -l $LOG -c zebra2.cfg update records || exit 1 +../../index/zebraidx -l $LOG -c $pp/zebra2.cfg update records || exit 1 echo "update 2..." >>$LOG -../../index/zebraidx -l $LOG -c zebra2.cfg update records || exit 1 +../../index/zebraidx -l $LOG -c $pp/zebra2.cfg update records || exit 1 echo "killing old server (if any)..." >>$LOG test -f zebrasrv.pid && kill -9 `cat zebrasrv.pid` echo "starting server..." >>$LOG -../../index/zebrasrv -S -c zebra2.cfg -l $LOG tcp:@:9901 & +../../index/zebrasrv -S -c $pp/zebra2.cfg -l $LOG tcp:@:9901 & sleep 1 test -f zebrasrv.pid || exit 1 @@ -27,7 +29,7 @@ echo "search 1..." >>$LOG grep "^Result count: 9$" log >/dev/null || exit 1 echo "update 3..." >>$LOG -../../index/zebraidx -l $LOG -c zebra2.cfg update records || exit 1 +../../index/zebraidx -l $LOG -c $pp/zebra2.cfg update records || exit 1 echo "search 2..." >>$LOG ../api/testclient localhost:9901 "@attr 1=4 utah" > log || exit 1 @@ -37,7 +39,7 @@ echo "making test records..." >>$LOG cp records/esdd0006.grs records/esdd0001.grs echo "indexing them..." >>$LOG -../../index/zebraidx -l $LOG -c zebra2.cfg update records || exit 1 +../../index/zebraidx -l $LOG -c $pp/zebra2.cfg update records || exit 1 echo "search 3..." >>$LOG ../api/testclient localhost:9901 "@attr 1=4 utah" > log || exit 1 @@ -45,7 +47,7 @@ grep "^Result count: 10$" log >/dev/null || exit 1 touch records/esdd0001.grs echo "indexing again..." >>$LOG -../../index/zebraidx -l $LOG -c zebra2.cfg update records || exit 1 +../../index/zebraidx -l $LOG -c $pp/zebra2.cfg update records || exit 1 echo "search 4..." >>$LOG ../api/testclient localhost:9901 "@attr 1=4 utah" > log || exit 1 @@ -55,7 +57,7 @@ echo "making another test record..." >>$LOG mv records/esdd0001.grs records/esdd0002.grs echo "indexing it too..." >>$LOG -../../index/zebraidx -l $LOG -c zebra2.cfg update records || exit 1 +../../index/zebraidx -l $LOG -c $pp/zebra2.cfg update records || exit 1 echo "search 5..." >>$LOG ../api/testclient localhost:9901 "@attr 1=4 utah" > log || exit 1 @@ -67,7 +69,7 @@ sed 's/UTAH/XYZ/g' records/esdd0002x.grs mv records/esdd0002x.grs records/esdd0002.grs echo "indexing it..." >>$LOG -../../index/zebraidx -l $LOG -c zebra2.cfg update records || exit 1 +../../index/zebraidx -l $LOG -c $pp/zebra2.cfg update records || exit 1 sleep 1 echo "search 6..." >>$LOG diff --git a/test/gils/test3.sh b/test/gils/test3.sh index 3a665c3..23dbc18 100755 --- a/test/gils/test3.sh +++ b/test/gils/test3.sh @@ -1,9 +1,11 @@ #!/bin/sh -# $Id: test3.sh,v 1.2 2004-02-12 15:14:19 heikki Exp $ +# $Id: test3.sh,v 1.3 2004-06-15 08:06:34 adam Exp $ # Testing searches with lots of @and operators # in order to test the fast-forward operation of rsets +pp=${srcdir:-"."} + LOG=test3.log DBG="-v 1647" @@ -14,13 +16,13 @@ rm -f zebrasrv.pid echo "initializing..." >>$LOG mkdir -p reg -../../index/zebraidx -l $LOG -c zebra1.cfg init || exit 1 +../../index/zebraidx -l $LOG -c $pp/zebra1.cfg init || exit 1 echo "updating..." >>$LOG -../../index/zebraidx -l $LOG -c zebra1.cfg update records || exit 1 +../../index/zebraidx -l $LOG -c $pp/zebra1.cfg update records || exit 1 echo "starting server..." >>$LOG -../../index/zebrasrv -S -c zebra1.cfg $DBG -l $LOG tcp:@:9901 & +../../index/zebrasrv -S -c $pp/zebra1.cfg $DBG -l $LOG tcp:@:9901 & sleep 1 echo "checking it runs..." >>$LOG @@ -83,7 +85,7 @@ echo "search D7..." >>$LOG ../api/testclient -c 15 localhost:9901 '@and @and in data the' > log || exit 1 echo "search D8..." >>$LOG -../api/testclient -c2 localhost:9901 "@attr 1=4 @and UNPUBLISHED @and REPORTS AND" >log || exit 1 +../api/testclient -c 2 localhost:9901 "@attr 1=4 @and UNPUBLISHED @and REPORTS AND" >log || exit 1 # This one failed at early fast-forwards echo "search E1..." >>$LOG diff --git a/test/gils/timing1.sh b/test/gils/timing1.sh index 29893ac..4506d9e 100755 --- a/test/gils/timing1.sh +++ b/test/gils/timing1.sh @@ -1,28 +1,30 @@ #!/bin/sh -# $Id: timing1.sh,v 1.7 2003-05-24 22:34:48 adam Exp $ +# $Id: timing1.sh,v 1.8 2004-06-15 08:06:34 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 +pp=${srcdir:-"."} + LOG=timing1.log rm -f $LOG echo " init..." >>$LOG rm -f records/esdd000[12].grs # these should not be here, will be created later -../../index/zebraidx -c zebra2.cfg -l $LOG init || exit 1 +../../index/zebraidx -c $pp/zebra2.cfg -l $LOG init || exit 1 echo " killing old server (if any)..." >>$LOG test -f zebrasrv.pid && kill -9 `cat zebrasrv.pid` echo " starting server..." >>$LOG -../../index/zebrasrv -S -c zebra2.cfg -l $LOG tcp:@:9901 & +../../index/zebrasrv -S -c $pp/zebra2.cfg -l $LOG tcp:@:9901 & sleep 1 test -f zebrasrv.pid || exit 1 sleep 2 echo " update 1..." >>$LOG -../../index/zebraidx -l $LOG -c zebra2.cfg update records || exit 1 +../../index/zebraidx -l $LOG -c $pp/zebra2.cfg update records || exit 1 sleep 2 echo " search 1..." >>$LOG @@ -34,7 +36,7 @@ echo "making a test record..." >>$LOG cp records/esdd0006.grs records/esdd0002.grs echo " indexing it..." >>$LOG -../../index/zebraidx -l $LOG -c zebra2.cfg update records || exit 1 +../../index/zebraidx -l $LOG -c $pp/zebra2.cfg update records || exit 1 sleep 2 echo " search 2..." >>$LOG @@ -47,7 +49,7 @@ sed 's/UTAH/XYZ/g' records/esdd0002x.grs mv records/esdd0002x.grs records/esdd0002.grs echo " indexing it..." >>$LOG -../../index/zebraidx -l $LOG -c zebra2.cfg update records || exit 1 +../../index/zebraidx -l $LOG -c $pp/zebra2.cfg update records || exit 1 sleep 2 echo " search 3..." >>$LOG @@ -61,7 +63,7 @@ sed 's/XYZ/UTAH/g' records/esdd0002x.grs mv records/esdd0002x.grs records/esdd0002.grs echo " indexing it..." >>$LOG -../../index/zebraidx -l $LOG -c zebra2.cfg update records || exit 1 +../../index/zebraidx -l $LOG -c $pp/zebra2.cfg update records || exit 1 sleep 2 echo " search 4..." >>$LOG @@ -75,7 +77,7 @@ sed 's/UTAH/XYZ/g' records/esdd0002x.grs mv records/esdd0002x.grs records/esdd0002.grs echo " indexing it..." >>$LOG -../../index/zebraidx -l $LOG -c zebra2.cfg update records || exit 1 +../../index/zebraidx -l $LOG -c $pp/zebra2.cfg update records || exit 1 sleep 2 echo " search 5..." >>$LOG @@ -90,7 +92,7 @@ mv records/esdd0002x.grs records/esdd0002.grs sleep 2 echo " indexing it..." >>$LOG -../../index/zebraidx -l $LOG -c zebra2.cfg update records || exit 1 +../../index/zebraidx -l $LOG -c $pp/zebra2.cfg update records || exit 1 sleep 2 echo " search 6..." >>$LOG @@ -106,7 +108,7 @@ mv records/esdd0002x.grs records/esdd0002.grs sleep 2 echo " indexing it..." >>$LOG -../../index/zebraidx -l $LOG -c zebra2.cfg update records || exit 1 +../../index/zebraidx -l $LOG -c $pp/zebra2.cfg update records || exit 1 sleep 2 echo " search 7..." >>$LOG @@ -120,7 +122,7 @@ sed 's/XYZ/UTAH/g' records/esdd0002x.grs mv records/esdd0002x.grs records/esdd0002.grs echo " indexing it..." >>$LOG -../../index/zebraidx -l $LOG -c zebra2.cfg update records || exit 1 +../../index/zebraidx -l $LOG -c $pp/zebra2.cfg update records || exit 1 sleep 2 echo " search 8..." >>$LOG diff --git a/test/gils/timing2.sh b/test/gils/timing2.sh index f9a78fe..a7b5e2b 100755 --- a/test/gils/timing2.sh +++ b/test/gils/timing2.sh @@ -1,7 +1,9 @@ #!/bin/sh -# $Id: timing2.sh,v 1.7 2003-05-24 22:34:48 adam Exp $ +# $Id: timing2.sh,v 1.8 2004-06-15 08:06:34 adam Exp $ # Demonstrated that updates depend on file timestamps +pp=${srcdir:-"."} + LOG=timing2.log rm -f $LOG @@ -9,20 +11,20 @@ rm -f $LOG echo " init..." >>$LOG rm -f log timeref[12] rm -f records/esdd000[12].grs # these should not be here, will be created later -../../index/zebraidx -c zebra2.cfg -l $LOG init || exit 1 +../../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 zebra2.cfg -l $LOG tcp:@:9901 & +../../index/zebrasrv -S -c $pp/zebra2.cfg -l $LOG tcp:@:9901 & sleep 1 test -f zebrasrv.pid || exit 1 touch timeref2 # make a later timestamp echo " update 1..." >>$LOG -../../index/zebraidx -l $LOG -c zebra2.cfg update records || exit 1 +../../index/zebraidx -l $LOG -c $pp/zebra2.cfg update records || exit 1 echo " search 1..." >>$LOG ../api/testclient localhost:9901 "@attr 1=4 utah" > log || exit 1 @@ -33,7 +35,7 @@ cp records/esdd0006.grs records/esdd0002.grs touch -r timeref1 records/esdd0002.grs echo " indexing it..." >>$LOG -../../index/zebraidx -l $LOG -c zebra2.cfg update records || exit 1 +../../index/zebraidx -l $LOG -c $pp/zebra2.cfg update records || exit 1 echo " search 2..." >>$LOG ../api/testclient localhost:9901 "@attr 1=4 utah" > log || exit 1 @@ -45,7 +47,7 @@ mv records/esdd0002x.grs records/esdd0002.grs touch -r timeref1 records/esdd0002.grs # reset timestamp to 'early' echo " not indexing it..." >>$LOG -../../index/zebraidx -l $LOG -c zebra2.cfg update records || exit 1 +../../index/zebraidx -l $LOG -c $pp/zebra2.cfg update records || exit 1 echo " search 3..." >>$LOG ../api/testclient localhost:9901 "@attr 1=4 utah" > log || exit 1 @@ -56,7 +58,7 @@ echo " touching its timestamp..." >>$LOG touch -r timeref2 records/esdd0002.grs # set timestamp to 'late' echo " indexing it..." >>$LOG -../../index/zebraidx -l $LOG -c zebra2.cfg update records || exit 1 +../../index/zebraidx -l $LOG -c $pp/zebra2.cfg update records || exit 1 echo " search 4..." >>$LOG ../api/testclient localhost:9901 "@attr 1=4 utah" > log || exit 1 diff --git a/test/gils/zebra1.cfg b/test/gils/zebra1.cfg index 7902082..617af9b 100644 --- a/test/gils/zebra1.cfg +++ b/test/gils/zebra1.cfg @@ -1,8 +1,8 @@ # Simple Zebra configuration file -# $Id: zebra1.cfg,v 1.5 2004-01-22 15:40:25 heikki Exp $ +# $Id: zebra1.cfg,v 1.6 2004-06-15 08:06:34 adam Exp $ # # Where the schema files, attribute files, etc are located. -profilePath: .:../../tab +profilePath: ${srcdir:-.}/../../tab # Files that describe the attribute sets supported. attset: bib1.att diff --git a/test/gils/zebra2.cfg b/test/gils/zebra2.cfg index 313e793..cafe907 100644 --- a/test/gils/zebra2.cfg +++ b/test/gils/zebra2.cfg @@ -1,8 +1,8 @@ # Simple Zebra configuration file -# $Id: zebra2.cfg,v 1.5 2004-01-22 15:40:25 heikki Exp $ +# $Id: zebra2.cfg,v 1.6 2004-06-15 08:06:34 adam Exp $ # # Where the schema files, attribute files, etc are located. -profilePath: .:../../tab +profilePath: ${srcdir:-.}/../../tab # Files that describe the attribute sets supported. attset: bib1.att diff --git a/test/malxml/test1.sh b/test/malxml/test1.sh index 6cda301..a31a203 100755 --- a/test/malxml/test1.sh +++ b/test/malxml/test1.sh @@ -1,9 +1,14 @@ #!/bin/sh +# $Id: test1.sh,v 1.4 2004-06-15 08:06:34 adam Exp $ + +pp=${srcdir:-"."} + LOG=test1.log + rm -f $LOG if ../../index/zebraidx -l $LOG -V|grep Expat >/dev/null; then - ../../index/zebraidx -l$LOG init + ../../index/zebraidx -c $pp/zebra.cfg -l$LOG init else exit 0 fi -../../index/zebraidx -l $LOG update f1.xml +../../index/zebraidx -c $pp/zebra.cfg -l $LOG update f1.xml diff --git a/test/malxml/zebra.cfg b/test/malxml/zebra.cfg index 1ceb59a..809a9f1 100644 --- a/test/malxml/zebra.cfg +++ b/test/malxml/zebra.cfg @@ -1,8 +1,8 @@ # Simple Zebra configuration file -# $Id: zebra.cfg,v 1.1 2003-09-08 09:30:17 adam Exp $ +# $Id: zebra.cfg,v 1.2 2004-06-15 08:06:34 adam Exp $ # # Where the schema files, attribute files, etc are located. -profilePath: .:../../tab +profilePath: ${srcdir:-.}/../../tab # Files that describe the attribute sets supported. attset: bib1.att diff --git a/test/marcxml/test1.sh b/test/marcxml/test1.sh index add59eb..284ad25 100755 --- a/test/marcxml/test1.sh +++ b/test/marcxml/test1.sh @@ -1,15 +1,19 @@ #!/bin/sh +# $Id: test1.sh,v 1.3 2004-06-15 08:06:34 adam Exp $ + +pp=${srcdir:-"."} + LOG=test1.log DBG="-v 1647" rm -f $LOG -if ../../index/zebraidx -l $LOG -V|grep Expat >/dev/null; then - ../../index/zebraidx -l $LOG $DBG init +if ../../index/zebraidx -c $pp/zebra.cfg -l $LOG -V|grep Expat >/dev/null; then + ../../index/zebraidx -c $pp/zebra.cfg -l $LOG $DBG init else exit 0 fi -../../index/zebraidx -l $LOG $DBG update m*.xml -../../index/zebrasrv -l $LOG $DBG unix:socket & +../../index/zebraidx -c $pp/zebra.cfg -l $LOG $DBG update m*.xml +../../index/zebrasrv -c $pp/zebra.cfg -l $LOG $DBG unix:socket & sleep 1 ../api/testclient unix:socket '@and @attr 1=1003 jack @attr 1=4 computer' >tmp1 echo 'Result count: 2' >tmp2 diff --git a/test/marcxml/test2.sh b/test/marcxml/test2.sh index ece764a..2ff0460 100755 --- a/test/marcxml/test2.sh +++ b/test/marcxml/test2.sh @@ -1,9 +1,13 @@ #!/bin/sh +# $Id: test2.sh,v 1.2 2004-06-15 08:06:34 adam Exp $ + +pp=${srcdir:-"."} + LOG=test2.log rm -f $LOG -../../index/zebraidx -l$LOG init -../../index/zebraidx -l$LOG -t grs.marcxml.record update sample-marc -../../index/zebrasrv -l$LOG unix:socket & +../../index/zebraidx -c $pp/zebra.cfg -l$LOG init +../../index/zebraidx -c $pp/zebra.cfg -l$LOG -t grs.marcxml.record update sample-marc +../../index/zebrasrv -c $pp/zebra.cfg -l$LOG unix:socket & sleep 1 ../api/testclient unix:socket '@and @attr 1=1003 jack @attr 1=4 computer' >tmp1 echo 'Result count: 2' >tmp2 diff --git a/test/rusmarc/test1.sh b/test/rusmarc/test1.sh index a84fdc2..d57b141 100755 --- a/test/rusmarc/test1.sh +++ b/test/rusmarc/test1.sh @@ -1,13 +1,16 @@ #!/bin/sh -# $Id: test1.sh,v 1.2 2004-03-09 18:52:37 adam Exp $ +# $Id: test1.sh,v 1.3 2004-06-15 08:06:34 adam Exp $ + +pp=${srcdir:-"."} + LOG=test1.log rm -f $LOG test -d tmp || mkdir tmp test -d lock || mkdir lock test -d register || mkdir register -../../index/zebraidx -l$LOG init -../../index/zebraidx -l$LOG update records/*marc -../../index/zebrasrv -l$LOG unix:socket & +../../index/zebraidx -c $pp/zebra.cfg -l$LOG init +../../index/zebraidx -c $pp/zebra.cfg -l$LOG update records/*marc +../../index/zebrasrv -c $pp/zebra.cfg -l$LOG unix:socket & sleep 1 # search text located in first record 600 $a # term is koi8-r encoded diff --git a/test/sort/test1.sh b/test/sort/test1.sh index 2d18e7c..787b27f 100755 --- a/test/sort/test1.sh +++ b/test/sort/test1.sh @@ -1,5 +1,8 @@ #!/bin/sh -# $Id: test1.sh,v 1.5 2003-09-24 11:45:44 adam Exp $ +# $Id: test1.sh,v 1.6 2004-06-15 08:06:35 adam Exp $ + +pp=${srcdir:-"."} + ulimit -c 10000 LOG=test1.log rm -fr lock @@ -9,8 +12,8 @@ mkdir reg rm -fr recs mkdir recs cp rec*.xml recs -../../index/zebraidx -l $LOG update recs || exit 1 -../../index/zebrasrv -l $LOG unix:socket & +../../index/zebraidx -c $pp/zebra.cfg -l $LOG update recs || exit 1 +../../index/zebrasrv -c $pp/zebra.cfg -l $LOG unix:socket & sleep 1 test -f lock/zebrasrv.pid || exit 2 ../api/testclient -n3 unix:socket '@or computer @attr 7=1 @attr 1=30 0' >tmp1 diff --git a/test/usmarc/zebra.cfg b/test/usmarc/zebra.cfg index 99933f9..b6f4255 100644 --- a/test/usmarc/zebra.cfg +++ b/test/usmarc/zebra.cfg @@ -1,9 +1,9 @@ # Simple Zebra configuration file that defines # a database with USMARC records. -# $Id: zebra.cfg,v 1.4 1999-12-08 22:11:56 adam Exp $ +# $Id: zebra.cfg,v 1.5 2004-06-15 08:06:35 adam Exp $ # # Where are the config files located? -profilePath: .:../../tab:../../../yaz/tab +profilePath: ${srcdir:-.}/../../tab # Files that describe the attribute sets supported. attset: bib1.att diff --git a/test/xpath/test1.sh b/test/xpath/test1.sh index c3dbc14..4dfa0f4 100755 --- a/test/xpath/test1.sh +++ b/test/xpath/test1.sh @@ -1,6 +1,9 @@ #!/bin/sh -# $Id: test1.sh,v 1.3 2003-05-21 14:39:23 adam Exp $ +# $Id: test1.sh,v 1.4 2004-06-15 08:06:35 adam Exp $ + +pp=${srcdir:-"."} + LOG=test1.log rm -f $LOG -../../index/zebraidx -l $LOG init || exit 1 -../../index/zebraidx -l $LOG -t grs.sgml update rec.xml || exit 2 +../../index/zebraidx -c $pp/zebra.cfg -l $LOG init || exit 1 +../../index/zebraidx -c $pp/zebra.cfg -l $LOG -t grs.sgml update rec.xml || exit 2 diff --git a/test/xpath/test2.sh b/test/xpath/test2.sh index 89cbfe2..ce99765 100755 --- a/test/xpath/test2.sh +++ b/test/xpath/test2.sh @@ -1,13 +1,16 @@ #!/bin/sh -# $Id: test2.sh,v 1.3 2003-05-21 14:39:23 adam Exp $ +# $Id: test2.sh,v 1.4 2004-06-15 08:06:35 adam Exp $ + +pp=${srcdir:-"."} + 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.xml || exit 2 +../../index/zebraidx -c $pp/zebra.cfg -l $LOG init || exit 1 +../../index/zebraidx -c $pp/zebra.cfg -l $LOG -t grs.sgml update rec.xml || exit 2 test -f dict*.mf || exit 1 -../../index/zebrasrv -l $LOG -S unix:socket & +../../index/zebrasrv -c $pp/zebra.cfg -l $LOG -S unix:socket & sleep 1 test -f zebrasrv.pid || exit 2 ../api/testclient unix:socket '@attr 1=/Zthes/termName Sauropoda' >$TMP diff --git a/test/xpath/test3.sh b/test/xpath/test3.sh index 25eb21b..721b4d3 100755 --- a/test/xpath/test3.sh +++ b/test/xpath/test3.sh @@ -1,13 +1,16 @@ #!/bin/sh -# $Id: test3.sh,v 1.3 2003-05-21 14:39:23 adam Exp $ +# $Id: test3.sh,v 1.4 2004-06-15 08:06:35 adam Exp $ + +pp=${srcdir:-"."} + 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.xml || exit 2 +../../index/zebraidx -c $pp/zebra.cfg -l $LOG init || exit 1 +../../index/zebraidx -c $pp/zebra.cfg -l $LOG -t grs.sgml update rec.xml || exit 2 test -f dict*.mf || exit 1 -../../index/zebrasrv -l $LOG -S unix:socket & +../../index/zebrasrv -c $pp/zebra.cfg -l $LOG -S unix:socket & sleep 1 test -f zebrasrv.pid || exit 2 ../api/testclient unix:socket '@attr 1=/Zthes/relation/termName Sauropoda' >$TMP diff --git a/test/xpath/test4.sh b/test/xpath/test4.sh index 1932565..ac31af7 100755 --- a/test/xpath/test4.sh +++ b/test/xpath/test4.sh @@ -1,5 +1,8 @@ #!/bin/sh -# $Id: test4.sh,v 1.1 2004-01-15 13:31:31 adam Exp $ +# $Id: test4.sh,v 1.2 2004-06-15 08:06:35 adam Exp $ + +pp=${srcdir:-"."} + LOG=test4.log TMP1=test4-1.tmp TMP2=test4-2.tmp @@ -8,10 +11,10 @@ TMP4=test4-4.tmp TMP5=test4-5.tmp rm -f $LOG rm -f $TMP -../../index/zebraidx -l $LOG init || exit 1 -../../index/zebraidx -l $LOG -t grs.sgml update rec4.xml || exit 2 +../../index/zebraidx -c $pp/zebra.cfg -l $LOG init || exit 1 +../../index/zebraidx -c $pp/zebra.cfg -l $LOG -t grs.sgml update rec4.xml || exit 2 test -f dict*.mf || exit 1 -../../index/zebrasrv -l $LOG -S unix:socket & +../../index/zebrasrv -c $pp/zebra.cfg -l $LOG -S unix:socket & sleep 1 test -f zebrasrv.pid || exit 2 ../api/testclient unix:socket '@attr 1=/root content' >$TMP1 diff --git a/test/xpath/test5.sh b/test/xpath/test5.sh index d193081..6429645 100755 --- a/test/xpath/test5.sh +++ b/test/xpath/test5.sh @@ -1,14 +1,17 @@ #!/bin/sh -# $Id: test5.sh,v 1.1 2004-02-09 17:44:49 heikki Exp $ +# $Id: test5.sh,v 1.2 2004-06-15 08:06:35 adam Exp $ + +pp=${srcdir:-"."} + LOG="test5.log" TMP="test5.tmp" DBG="-v 1647" rm -f $LOG rm -f $TMP.* -../../index/zebraidx -l $LOG init || exit 1 -../../index/zebraidx -l $LOG -t grs.sgml update rec5.xml || exit 2 +../../index/zebraidx -c $pp/zebra.cfg -l $LOG init || exit 1 +../../index/zebraidx -c $pp/zebra.cfg -l $LOG -t grs.sgml update rec5.xml || exit 2 test -f dict*.mf || exit 1 -../../index/zebrasrv -l $LOG $DBG -S unix:socket & +../../index/zebrasrv -c $pp/zebra.cfg -l $LOG $DBG -S unix:socket & sleep 1 test -f zebrasrv.pid || exit 2 ../api/testclient unix:socket '@attr 1=/record/title foo' >$TMP.1 diff --git a/test/zsh/testall.sh b/test/zsh/testall.sh index b2fa5cf..1eef519 100755 --- a/test/zsh/testall.sh +++ b/test/zsh/testall.sh @@ -1,12 +1,16 @@ #!/bin/sh +# $Id: testall.sh,v 1.3 2004-06-15 08:06:36 adam Exp $ # run all zebrash tests -mkdir -p reg + +pp=${srcdir:-"."} + +test -d reg || mkdir reg rm -f *.mf reg/*.mf *.out for F in *.zsh do echo $F - ../../index/zebrash <$F >$F.out + ../../index/zebrash -c $pp/zebra.cfg <$F >$F.out RC=$? if [ "$RC" -gt "0" ] then -- 1.7.10.4