X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=test%2Frun_pazpar2.sh;h=b4b9f866950f94d48071118c0a33c2ddf0c7f2b1;hb=ab5293e6a603757882192d31ff3af4d99ef87731;hp=f199aad7acee3dff72cfb97808ae644f0783da57;hpb=e107b0011a295ccc61502d6e5ea79d9125a3fbb4;p=pazpar2-moved-to-github.git diff --git a/test/run_pazpar2.sh b/test/run_pazpar2.sh index f199aad..b4b9f86 100755 --- a/test/run_pazpar2.sh +++ b/test/run_pazpar2.sh @@ -31,10 +31,11 @@ fi CFG=${PREFIX}.cfg URLS=${PREFIX}_urls +usevalgrind=false if test "$usevalgrind"; then - valgrind --log-file=valgrind ../src/pazpar2 -X -l pazpar2.log -f ${CFG} -t ${srcdir}/test_http.xml >extra_pazpar2.log 2>&1 & + valgrind --leak-check=full --log-file=valgrind ../src/pazpar2 -X -l pazpar2.log -f ${CFG} >extra_pazpar2.log 2>&1 & else - ../src/pazpar2 -X -l pazpar2.log -f ${srcdir}/${CFG} -t ${srcdir}/test_http.xml >extra_pazpar2.log 2>&1 & + YAZ_LOG=zoom,zoomdetails,debug,log,fatal ../src/pazpar2 -d -X -l pazpar2.log -f ${srcdir}/${CFG} >extra_pazpar2.log 2>&1 & fi @@ -69,7 +70,11 @@ for f in `cat ${srcdir}/${URLS}`; do if test -f $OUT1; then rm -f $OUT2 if test -n "${wget}"; then - ${wget} -q -O $OUT2 $f + if test -n "${postfile}"; then + ${wget} -q -O $OUT2 --header="Content-Type: text/xml" --post-file=$postfile $f + else + ${wget} -q -O $OUT2 $f + fi elif test -n "${lynx}"; then ${lynx} -dump $f >$OUT2 else @@ -79,6 +84,7 @@ for f in `cat ${srcdir}/${URLS}`; do : else echo "Test $testno: Failed. See $OUT1, $OUT2 and $DIFF" + echo "URL: $f" code=1 fi else @@ -87,13 +93,22 @@ for f in `cat ${srcdir}/${URLS}`; do code=1 fi testno=`expr $testno + 1` - else + postfile= + elif echo $f | grep '^[0-9]' >/dev/null; then sleep $f + else + if test -f $f; then + postfile=$f + else + echo "File $f does not exist" + code=1 + fi fi if ps -p $PP2PID >/dev/null 2>&1; then : else - echo "pazpar2 died" + echo "Test $testno: pazpar2 died" + exit 1 fi done IFS="$oIFS"