2 # $Id: test_http.sh,v 1.5 2007-05-16 09:37:34 adam Exp $
4 # Regression test using pazpar2 against z3950.indexdata.com/marc
5 # Reads Pazpar2 URLs from test_http_urls
6 # Outputs to test_http_<no>.log
7 # Matches against results in test_http_<no>.res
11 # srcdir might be set by make
14 if test -x /usr/bin/wget; then
22 ../src/pazpar2 -l pazpar2.log -f ${srcdir}/test_http.cfg -t ${srcdir}/test_http.xml >extra_pazpar2.log 2>&1 &
25 # Give it a chance to start properly..
28 # Set to success by default.. Will be set to non-zero in case of failure
31 if ps -p $PP2PID >/dev/null 2>&1; then
36 echo "pazpar2 failed to start"
39 # We can start test for real
46 for f in `cat ${srcdir}/test_http_urls`; do
47 if echo $f | grep '^http' >/dev/null; then
48 OUT1=${srcdir}/test_http_${testno}.res
49 OUT2=test_http_${testno}.log
50 DIFF=test_http_${testno}.dif
51 if test -f $OUT1; then
54 if diff $OUT1 $OUT2 >$DIFF; then
57 echo "Test $testno: Failed. See $OUT1, $OUT2 and $DIFF"
61 echo "Test $testno: Making for the first time"
65 testno=`expr $testno + 1`
75 if test -n "$PP2PID"; then