From 1eb7d01be589a9558f17692e1fbc222580f6cbd3 Mon Sep 17 00:00:00 2001 From: Eric House Date: Thu, 11 Dec 2014 20:23:51 -0800 Subject: [PATCH] add option to turn on duplicate packets -- which fires an assert on the relay instantly. --- xwords4/linux/scripts/discon_ok2.sh | 30 ++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/xwords4/linux/scripts/discon_ok2.sh b/xwords4/linux/scripts/discon_ok2.sh index c115ec615..ace1c5e39 100755 --- a/xwords4/linux/scripts/discon_ok2.sh +++ b/xwords4/linux/scripts/discon_ok2.sh @@ -30,6 +30,7 @@ BOARD_SIZES_NEW=(15) NAMES=(UNUSED Brynn Ariela Kati Eric) SEND_CHAT='' CORE_COUNT=$(ls core.* 2>/dev/null | wc -l) +DUP_PACKETS='' declare -A PIDS declare -A APPS @@ -223,6 +224,9 @@ build_cmds() { if [ -n "$SEND_CHAT" ]; then PARAMS="$PARAMS --send-chat $SEND_CHAT" fi + if [ -n "$DUP_PACKETS" ]; then + PARAMS="$PARAMS --dup-packets" + fi # PARAMS="$PARAMS --my-port 1024" # PARAMS="$PARAMS --savefail-pct 10" [ -n "$SEED" ] && PARAMS="$PARAMS --seed $RANDOM" @@ -560,25 +564,26 @@ function getArg() { function usage() { [ $# -gt 0 ] && echo "Error: $1" >&2 echo "Usage: $(basename $0) \\" >&2 - echo " [--udp-start ] \\" >&2 - echo " [--udp-incr ] \\" >&2 + echo " [--dup-packets] # send all packets twice \\" >&2 echo " [--clean-start] \\" >&2 echo " [--game-dict ]* \\" >&2 - echo " [--old-app &2 + echo " [--help] \\" >&2 + echo " [--host ] \\" >&2 + echo " [--max-devs ] \\" >&2 + echo " [--min-devs ] \\" >&2 echo " [--new-app &2 echo " [--new-app-args [arg*]] # passed only to new app \\" >&2 - echo " [--min-devs ] \\" >&2 - echo " [--max-devs ] \\" >&2 - echo " [--one-per] # force one player per device \\" >&2 echo " [--num-games ] \\" >&2 echo " [--num-rooms ] \\" >&2 - echo " [--host ] \\" >&2 + echo " [--old-app &2 + echo " [--one-per] # force one player per device \\" >&2 echo " [--port ] \\" >&2 - echo " [--seed ] \\" >&2 - echo " [--undo-pct ] \\" >&2 - echo " [--send-chat \\" >&2 echo " [--resign-ratio <0 <= n <=1000 > \\" >&2 - echo " [--help] \\" >&2 + echo " [--seed ] \\" >&2 + echo " [--send-chat \\" >&2 + echo " [--udp-incr ] \\" >&2 + echo " [--udp-start ] \\" >&2 + echo " [--undo-pct ] \\" >&2 exit 1 } @@ -612,6 +617,9 @@ while [ "$#" -gt 0 ]; do APPS_OLD[${#APPS_OLD[@]}]=$(getArg $*) shift ;; + --dup-packets) + DUP_PACKETS=1 + ;; --new-app) APP_NEW=$(getArg $*) shift