2 # $Id: test_http.sh,v 1.4 2007-05-16 08:31:17 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
16 ../src/pazpar2 -l pazpar2.log -f ${srcdir}/test_http.cfg -t ${srcdir}/test_http.xml >extra_pazpar2.log 2>&1 &
19 # Give it a chance to start properly..
22 # Set to success by default.. Will be set to non-zero in case of failure
25 if ps -p $PP2PID >/dev/null 2>&1; then
30 echo "pazpar2 failed to start"
33 # We can start test for real
40 for f in `cat ${srcdir}/test_http_urls`; do
41 if echo $f | grep '^http' >/dev/null; then
42 OUT1=${srcdir}/test_http_${testno}.res
43 OUT2=test_http_${testno}.log
44 DIFF=test_http_${testno}.dif
45 if test -f $OUT1; then
48 if diff $OUT1 $OUT2 >$DIFF; then
51 echo "Test $testno: Failed. See $OUT1, $OUT2 and $DIFF"
55 echo "Test $testno: Making for the first time"
59 testno=`expr $testno + 1`
69 if test -n "$PP2PID"; then