From: Heikki Levanto Date: Thu, 21 Nov 2013 13:15:32 +0000 (+0100) Subject: Self-sufficient tests, all configs included X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=e0f2463e427ca3f445b92636bb90c36792e85a50;p=pazpar2-moved-to-github.git Self-sufficient tests, all configs included --- diff --git a/etc/default.xml b/etc/default.xml index 66312dd..b08eb81 100644 --- a/etc/default.xml +++ b/etc/default.xml @@ -25,7 +25,9 @@ - + + + diff --git a/heikki/README-HEIKKI b/heikki/README-HEIKKI index 238a7b2..77977e8 100644 --- a/heikki/README-HEIKKI +++ b/heikki/README-HEIKKI @@ -16,3 +16,5 @@ Tue 19-Nov-2013 Started this branch Wed 20-Nov-2013 Make a script that tests ranking against yaz-zserver (as that is the default config). Mostly to have a script to build on later. + +Thu 21-Nov-2013. Start my own complete config diff --git a/heikki/marc21.xsl b/heikki/marc21.xsl new file mode 100644 index 0000000..e7bee0c --- /dev/null +++ b/heikki/marc21.xsl @@ -0,0 +1,467 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + electronic resource + + + electronic resource + + + article + + + book + + + + + + + + yes + + + yes + + + no + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + , + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/heikki/service.xml b/heikki/service.xml new file mode 100644 index 0000000..5651f30 --- /dev/null +++ b/heikki/service.xml @@ -0,0 +1,118 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/heikki/test1.cfg b/heikki/test1.cfg index 129d2aa..283c2fd 100644 --- a/heikki/test1.cfg +++ b/heikki/test1.cfg @@ -2,8 +2,8 @@ - - + + diff --git a/heikki/test1.sh b/heikki/test1.sh index 14032e9..0814bf0 100755 --- a/heikki/test1.sh +++ b/heikki/test1.sh @@ -5,24 +5,30 @@ # # (uses curl and xml-twig-tools) -DIR=`cd ..; pwd` -HDIR=$DIR/heikki -CFG="$DIR/etc/heikki-test1.cfg" +if [ "$1" == "clean" ] +then + echo "Cleaning up" + rm -f $PIDFILE $YAZPIDFILE *.out *.log *~ + exit +fi -PZ="$DIR/src/pazpar2" +CFG="test1.cfg" -PIDFILE=$HDIR/pz2.pid -YAZPIDFILE=$HDIR/yaz-ztest.pid +PZ="../src/pazpar2" + +PIDFILE=pz2.pid +YAZPIDFILE=yaz-ztest.pid yaz-ztest -p $YAZPIDFILE -l yaz-ztest.log & +rm -f *.out *.log -$PZ -f $CFG -w "$DIR/etc" -l $HDIR/pz2.log -p $PIDFILE & +$PZ -f $CFG -l pz2.log -p $PIDFILE & sleep 0.2 # make sure it has time to start echo "Init" curl -s "http://localhost:9017/?command=init" > init.out SESSION=`xml_grep --text_only "//session" init.out ` -cat init.out +# cat init.out; echo echo "Got session $SESSION" SES="&session=$SESSION" @@ -33,18 +39,17 @@ QRY="query=computer" SEARCH="command=search$SES&$QRY&sort=relevance" echo $SEARCH curl -s "http://localhost:9017/?$SEARCH" > search.out -cat search.out +cat search.out | grep search echo SHOW="command=show$SES&sort=relevance" echo $SHOW curl -s "http://localhost:9017/?$SHOW" > show.out -echo "md-score:" -grep "md-score" show.out -echo "relevance:" -grep "relevance" show.out +grep "relevance" show.out | grep += | grep -v "(0)" echo echo "All done" kill `cat $PIDFILE` -kill `cat $YAZPIDFILE` \ No newline at end of file +kill `cat $YAZPIDFILE` +rm -f $PIDFILE $YAZPIDFILE + diff --git a/heikki/ztest.xml b/heikki/ztest.xml new file mode 100644 index 0000000..69a8c36 --- /dev/null +++ b/heikki/ztest.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + +