From febf32040e4cad528c12eb9c837d0215054f50b1 Mon Sep 17 00:00:00 2001 From: Andy2 Date: Fri, 7 Oct 2011 18:51:27 -0700 Subject: [PATCH] don't kill xwords; it'll exit when it's done --- xwords4/linux/scripts/test_backsend.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/xwords4/linux/scripts/test_backsend.sh b/xwords4/linux/scripts/test_backsend.sh index 161e34272..45d907424 100755 --- a/xwords4/linux/scripts/test_backsend.sh +++ b/xwords4/linux/scripts/test_backsend.sh @@ -22,7 +22,7 @@ for NUM in $(seq 1 2); do LOG=$DIR/game_${NUM}.log $APP $COMMON_ARGS --file $DIR/game_${NUM}.xwg > /dev/null 2>$LOG & PID1=$! - sleep 2 + sleep 4 kill $PID1 wait $PID1 done @@ -30,30 +30,30 @@ done # run apps until done NBS=$DIR/nbs ZERO_COUNT=0 -while [ $ZERO_COUNT -lt 5 ]; do +while [ $ZERO_COUNT -lt 2 ]; do WORK_DONE="" for NUM in $(seq 1 2); do LOG=$DIR/game_${NUM}.log RELAYID=$(./scripts/relayID.sh --short $LOG) MSG_COUNT=$(../relay/rq -m $RELAYID 2>/dev/null | sed 's,^.*-- ,,') if [ "$MSG_COUNT" -gt 0 ]; then + echo "*** $MSG_COUNT messages available ***" WORK_DONE=true $APP $COMMON_ARGS --file $DIR/game_${NUM}.xwg \ --with-nbs $NBS > /dev/null & PID1=$! - sleep 1 # let server get ready - ../relay/rq -f $RELAYID -b $NBS - sleep 2 - kill $PID1 && wait $PID1 || true + wait $PID1 || true else sleep 1 fi done - [ -z "$WORK_DONE" ] && ZERO_COUNT=$((ZERO_COUNT+1)) + if [ -z "$WORK_DONE" ]; then + ZERO_COUNT=$((ZERO_COUNT+1)) + fi done echo "$0 done (pid: $PID)"