mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-29 08:34:37 +01:00
changes to work against remote relay
This commit is contained in:
parent
076b211cab
commit
659278448b
1 changed files with 10 additions and 5 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue