mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-28 07:58:08 +01:00
add --via-udp option -- which causes app to crash because the memory
leak detector is working
This commit is contained in:
parent
9f3250cb3f
commit
cbb82eb5e8
1 changed files with 16 additions and 2 deletions
|
@ -4,6 +4,7 @@ set -u -e
|
||||||
APP_NEW=""
|
APP_NEW=""
|
||||||
APP_NEW_PARAMS=""
|
APP_NEW_PARAMS=""
|
||||||
NGAMES=""
|
NGAMES=""
|
||||||
|
USE_UDP=""
|
||||||
UPGRADE_ODDS=""
|
UPGRADE_ODDS=""
|
||||||
NROOMS=""
|
NROOMS=""
|
||||||
HOST=""
|
HOST=""
|
||||||
|
@ -166,7 +167,11 @@ build_cmds() {
|
||||||
DEV=0
|
DEV=0
|
||||||
for NLOCALS in ${LOCALS[@]}; do
|
for NLOCALS in ${LOCALS[@]}; do
|
||||||
DEV=$((DEV + 1))
|
DEV=$((DEV + 1))
|
||||||
FILE="${LOGDIR}/GAME_${GAME}_${DEV}.xwg"
|
if [ -n "$USE_UDP" ]; then
|
||||||
|
FILE="${LOGDIR}/GAME_${GAME}_${DEV}.sql3"
|
||||||
|
else
|
||||||
|
FILE="${LOGDIR}/GAME_${GAME}_${DEV}.xwg"
|
||||||
|
fi
|
||||||
LOG=${LOGDIR}/${GAME}_${DEV}_LOG.txt
|
LOG=${LOGDIR}/${GAME}_${DEV}_LOG.txt
|
||||||
> $LOG # clear the log
|
> $LOG # clear the log
|
||||||
|
|
||||||
|
@ -187,7 +192,12 @@ build_cmds() {
|
||||||
PARAMS="$PARAMS $BOARD_SIZE --room $ROOM --trade-pct 20 --sort-tiles "
|
PARAMS="$PARAMS $BOARD_SIZE --room $ROOM --trade-pct 20 --sort-tiles "
|
||||||
[ $UNDO_PCT -gt 0 ] && PARAMS="$PARAMS --undo-pct $UNDO_PCT "
|
[ $UNDO_PCT -gt 0 ] && PARAMS="$PARAMS --undo-pct $UNDO_PCT "
|
||||||
PARAMS="$PARAMS --game-dict $DICT --port $PORT --host $HOST "
|
PARAMS="$PARAMS --game-dict $DICT --port $PORT --host $HOST "
|
||||||
PARAMS="$PARAMS --file $FILE --slow-robot 1:3 --skip-confirm"
|
PARAMS="$PARAMS --slow-robot 1:3 --skip-confirm"
|
||||||
|
if [ -n "$USE_UDP" ]; then
|
||||||
|
PARAMS="$PARAMS --db $FILE"
|
||||||
|
else
|
||||||
|
PARAMS="$PARAMS --file $FILE"
|
||||||
|
fi
|
||||||
PARAMS="$PARAMS --drop-nth-packet $DROP_N $PLAT_PARMS"
|
PARAMS="$PARAMS --drop-nth-packet $DROP_N $PLAT_PARMS"
|
||||||
# PARAMS="$PARAMS --savefail-pct 10"
|
# PARAMS="$PARAMS --savefail-pct 10"
|
||||||
[ -n "$SEED" ] && PARAMS="$PARAMS --seed $RANDOM"
|
[ -n "$SEED" ] && PARAMS="$PARAMS --seed $RANDOM"
|
||||||
|
@ -514,6 +524,7 @@ function getArg() {
|
||||||
function usage() {
|
function usage() {
|
||||||
[ $# -gt 0 ] && echo "Error: $1" >&2
|
[ $# -gt 0 ] && echo "Error: $1" >&2
|
||||||
echo "Usage: $(basename $0) \\" >&2
|
echo "Usage: $(basename $0) \\" >&2
|
||||||
|
echo " [--via-udp] \\" >&2
|
||||||
echo " [--game-dict <path/to/dict>]* \\" >&2
|
echo " [--game-dict <path/to/dict>]* \\" >&2
|
||||||
echo " [--old-app <path/to/app]* \\" >&2
|
echo " [--old-app <path/to/app]* \\" >&2
|
||||||
echo " [--new-app <path/to/app] \\" >&2
|
echo " [--new-app <path/to/app] \\" >&2
|
||||||
|
@ -538,6 +549,9 @@ function usage() {
|
||||||
|
|
||||||
while [ "$#" -gt 0 ]; do
|
while [ "$#" -gt 0 ]; do
|
||||||
case $1 in
|
case $1 in
|
||||||
|
--via-udp)
|
||||||
|
USE_UDP=true
|
||||||
|
;;
|
||||||
--num-games)
|
--num-games)
|
||||||
NGAMES=$(getArg $*)
|
NGAMES=$(getArg $*)
|
||||||
shift
|
shift
|
||||||
|
|
Loading…
Add table
Reference in a new issue