diff --git a/xwords4/linux/scripts/discon_ok2.sh b/xwords4/linux/scripts/discon_ok2.sh index ea52d0328..698b7c8da 100755 --- a/xwords4/linux/scripts/discon_ok2.sh +++ b/xwords4/linux/scripts/discon_ok2.sh @@ -3,6 +3,10 @@ NGAMES=${NGAMES:-1} NROOMS=${NROOMS:-1} TIMEOUT=${TIMEOUT:-600} +HOST=${HOST:-localhost} +PORT=${PORT:-10997} + +NAMES=(Brynn Ariela Kati Eric) LOGDIR=$(basename $0)_logs mv $LOGDIR /tmp/$LOGDIR_$$ @@ -17,7 +21,7 @@ fi usage() { echo "usage: [env=val *] $0" 1>&2 echo " current env variables and their values: " 1>&2 - for VAR in NGAMES NROOMS USE_GTK TIMEOUT; do + for VAR in NGAMES NROOMS USE_GTK TIMEOUT HOST PORT; do echo "$VAR:" $(eval "echo \$${VAR}") 1>&2 done exit 0 @@ -41,8 +45,9 @@ do_device() { STOPTIME=$(($(date "+%s") + TIMEOUT)) while :; do sleep $((RANDOM%5)) - ./obj_linux_memdbg/xwords -C $ROOM -r edd $OTHERS \ - -d dict.xwd -f $FILE -z 1:3 $PLAT_PARMS >/dev/null 2>>$LOG & + ./obj_linux_memdbg/xwords -C $ROOM -r ${NAMES[$DEV]} $OTHERS \ + -d dict.xwd -p $PORT -a $HOST -f $FILE -z 1:3 $PLAT_PARMS \ + >/dev/null 2>>$LOG & PID=$! sleep $((RANDOM%10+5)) while :; do @@ -59,8 +64,8 @@ do_device() { echo -n "timeout exceeded for device $DEV in game $GAME ($LOG)" date break - elif ! pidof xwrelay > /dev/null; then - break + elif [ ! -d $LOGDIR ]; then + break; fi done } diff --git a/xwords4/linux/scripts/newrelay.sh b/xwords4/linux/scripts/newrelay.sh index c5464dcb5..a4455e60a 100755 --- a/xwords4/linux/scripts/newrelay.sh +++ b/xwords4/linux/scripts/newrelay.sh @@ -5,6 +5,8 @@ COOKIE=${COOKIE:-foo} NGAMES=${NGAMES:-1} NPLAYERS=${NPLAYERS:-2} USE_GTK=${USE_GTK:-FALSE} +HOST=${HOST:-localhost} +PORT=${PORT:-10997} [ $USE_GTK = FALSE ] && CURSES_PARM="-u -0" @@ -14,7 +16,7 @@ mkdir -p $LOGDIR usage() { echo "usage: [env=val *] $0" 1>&2 echo " current env variables and their values: " 1>&2 - for VAR in COOKIE DICT NGAMES NPLAYERS USE_GTK; do + for VAR in COOKIE DICT NGAMES NPLAYERS HOST PORT USE_GTK; do echo "$VAR:" $(eval "echo \$${VAR}") 1>&2 done exit 0 @@ -35,7 +37,7 @@ for II in $(seq $NGAMES); do done for JJ in $(seq $NPLAYERS); do ./obj_linux_memdbg/xwords $CURSES_PARM -d $DICT -r Eric $REMOTES \ - -C $COOKIE -q 2 2>${LOGDIR}/log_${II}_${JJ}.txt >/dev/null & + -a $HOST -p $PORT -C $COOKIE -q 2 2>${LOGDIR}/log_${II}_${JJ}.txt >/dev/null & done done