From b00ca621696a85980b44ba782130d07fb68533f8 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Wed, 13 Nov 2013 12:40:00 +0100 Subject: [PATCH] testing: suppress diff warning + minor refactor --- test/run_pazpar2.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/test/run_pazpar2.sh b/test/run_pazpar2.sh index 07bdf72..8ada79a 100755 --- a/test/run_pazpar2.sh +++ b/test/run_pazpar2.sh @@ -17,14 +17,14 @@ kill_pazpar2() if test -n "$PP2PID"; then kill $PP2PID fi - if test -n "$SLEEP_PID"; then - kill $SLEEP_PID - SLEEP_PID="" - fi if test -f ztest.pid; then kill `cat ztest.pid` rm -f ztest.pid fi + if test -n "$SLEEP_PID"; then + kill $SLEEP_PID + SLEEP_PID="" + fi } ztest=false @@ -132,6 +132,7 @@ if test -n "$PAZPAR2_USE_VALGRIND"; then valgrind --num-callers=30 --show-reachable=yes --leak-check=full --log-file=$VALGRINDLOG ../src/pazpar2 -v $LEVELS -X -l ${PREFIX}_pazpar2.log -f ${CFG} >${PREFIX}_extra_pazpar2.log 2>&1 & PP2PID=$! sleep 6 + WAIT=400 elif test -n "$SKIP_PAZPAR2"; then echo "Test ${PREFIX}: not starting Pazpar2 (should be running already)" else @@ -185,7 +186,7 @@ for f in `cat ${srcdir}/${URLS}`; do fi rounds=`expr $rounds - 1` if test -f $OUT1 -a -z "$PAZPAR2_OVERRIDE_TEST"; then - if diff $OUT1 $OUT2 >$DIFF; then + if diff $OUT1 $OUT2 >$DIFF 2>/dev/null; then rm $DIFF rm $OUT2 rounds=0 -- 1.7.10.4