Commit graph

276 commits

Author SHA1 Message Date
Eric House
6446819466 use nice to give the relay a fighting chance 2013-06-21 05:41:23 -07:00
Eric House
5bec10048b add --clean-start option to speed testing 2013-06-20 06:45:51 -07:00
Eric House
0fad19e38a make it possible to mix udp and non-udp games (which currently crashes the relay very rarely) 2013-01-24 18:56:10 -08:00
Eric House
cbb82eb5e8 add --via-udp option -- which causes app to crash because the memory
leak detector is working
2013-01-24 08:00:53 -08:00
Eric House
6ca966f22a make test script and linux client mimic case where relay regid is
rejected by relay.  Client re-registers and a new relay regid is
issued.
2012-11-12 07:27:20 -08:00
Eric House
b53412d98d Fix to actually work. Grrr. 2012-11-10 14:52:10 -08:00
Eric House
b0f85e02df use grep of app's help message to determine whether a param is
supported so can test with older clients and not crash.
2012-11-09 06:55:38 -08:00
Eric House
59937b8514 modify how devids are handled on the relay and the protocol through
which they're communicated to the device.  Device is expected to have
a platform-specific notion of ID which the relay stores in a new
devices table and indexes with a 32-bit number which is returned to
the device -- which is encouraged but not required to use it in lieu
of the longer ID in future communications.  Modify linux client and
test script to use the relay-supplied id.  Some of this is commented
out for now.
2012-11-03 10:58:01 -07:00
Eric House
4ea8569abc honor --min-devs flag 2012-10-27 08:15:07 -07:00
Eric House
a6bed2706d include, commented out, the parameter that makes things fall apart. I
think the protocol needs work to survive devices failing to save
state.  Better to work on making sure they always save.
2012-09-11 20:45:03 -07:00
Eric House
ad4231289f fix --max-devs and resigns begin allowed when only one game 2012-09-11 07:24:51 -07:00
Eric House
b343034cc2 add ability to pass params only to new version of app so that test of
upgrade from old to new needn't skip test of new features.
2012-05-28 11:04:39 -07:00
Eric House
e36635944e fix to make two-device games much more common than four-device ones 2012-05-27 19:05:27 -07:00
Eric House
5309da9845 add --undo-pct option that passes through to curses client 2012-05-24 22:17:10 -07:00
Eric House
f7c49a6620 remove shift: --one-per doesn't take a param 2012-05-08 06:15:06 -07:00
Eric House
c2d8b17747 add --sort-tiles and fix confict between param name in code and in usage() 2012-05-05 10:55:35 -07:00
Eric House
7afa4f26db use the new --trade-pct flag 2012-05-03 19:00:56 -07:00
Eric House
af26ebfff9 fix usage hint 2012-01-26 05:40:22 -08:00
Eric House
af7398ce20 fix undeclared variable. 2011-12-15 18:36:47 -08:00
Eric House
964d2dfb0b allow, by default, more than one-player-per-device, but require that
roomnames be unique to eliminate risk of devices not matching up
correctly.
2011-12-02 18:55:20 -08:00
Andy2
08063d9444 Merge branch 'android_branch' into send_in_background
Conflicts:
	xwords4/android/XWords4/src/org/eehouse/android/xw4/NetUtils.java
	xwords4/android/XWords4/src/org/eehouse/android/xw4/XWApp.java
2011-12-01 21:18:37 -08:00
Eric House
6691c0713c Merge remote branch 'origin/android_branch' into android_branch 2011-12-01 20:16:15 -08:00
Eric House
0065f5078e add variable controlling odds of "upgrading" -- which still needs tweaking. 2011-12-01 20:16:09 -08:00
Eric House
1e48a8d615 Merge remote branch 'origin/android_branch' into android_branch
Conflicts:
	xwords4/common/model.c
2011-12-01 20:12:27 -08:00
Eric House
32f1dfa5da configure by passing params rather than setting ENV variables 2011-11-30 21:01:11 -08:00
Eric House
c39487e0cc add ability to start out with mix of old and new versions and have old
upgrade to new at random times.
2011-11-29 20:51:19 -08:00
Eric House
c1e420f726 Merge branch 'android_branch' into send_in_background
Conflicts:
	xwords4/relay/rq.c
2011-11-29 06:45:32 -08:00
Eric House
c8b868c243 Separate app from params. No change in behavior (though restart of
existing games is now broken), but this sets up testing mid-game
upgrade.
2011-11-29 06:43:16 -08:00
Eric House
c6e994abef use $RANDOM rather than $SEED -- still repeatable, but avoids relay
problems when devices have same game seed.
2011-11-28 18:53:40 -08:00
Eric House
384a41ed5b add ability to specify seed and vary board-size 2011-11-25 18:03:51 -08:00
Eric House
b00327aa8b fix to work for NDEVS > 2. 2011-11-21 17:35:08 -08:00
Eric House
a0a8a816a4 make number of devices configurable 2011-11-21 10:09:29 -08:00
Eric House
55d23c9502 various improvements, including allowing to specify seed to enhance
reproducibility, copying xwrelay.log into directory with game logs
when they don't finish for easier analysis.
2011-11-17 19:58:08 -08:00
Andy2
2492e7cfc5 Merge branch 'android_branch' into send_in_background
Conflicts:
	xwords4/linux/cursesmain.c
2011-11-13 17:10:46 -08:00
Eric House
5be5e9fdeb cleanup script output 2011-11-10 18:39:35 -08:00
Andy2
00f743409a script for reproducing problem with relay games that show up randomly. 2011-11-10 06:51:30 -08:00
Andy2
956fe350ba remove changed param -- mmap's the default now. 2011-11-07 18:19:12 -08:00
Andy2
febf32040e don't kill xwords; it'll exit when it's done 2011-10-07 18:51:27 -07:00
Andy2
38adeb9160 improve script to be more patient but exit after there stop being
messages -- which usually means the games finished.  With this and
previous changes the background stuff works most of the time.  Now to
debug why it's not all of the time.
2011-09-30 18:22:25 -07:00
Andy2
9bc36cd431 not an error when wait fails 2011-09-30 06:51:48 -07:00
Andy2
9c586efb02 new script for testing this branch's changes: replying to
messages delivered in the background.
2011-09-30 05:43:24 -07:00
Andy2
4a49db5c2a initialize variable 2011-09-30 05:42:44 -07:00
Eric House
c2c673e932 improve testing of proxy delete by saving up a number of relayIDs and
sending with multiple -d flags to rq.
2011-08-16 19:44:37 -07:00
Eric House
47da43a581 use new param to turn on mmap 2011-07-18 18:08:31 -07:00
Andy2
c482df300b better value for RESIGN_RATIO 2011-07-15 18:24:26 -07:00
Andy2
1686f3d9a8 make --skip-confirm do what it says, and include it in test script. 2011-07-12 07:13:58 -07:00
Eric House
abf60e027d fix pattern to pick the right hostid. 2011-07-06 20:02:51 -07:00
Andy2
4789bac85e add new mode that only launches games after the relay says there's a
message for them.  This is to mimic a common way games are played on
Android and to ensure that there are no points where that style of
play hangs because no device in the game will be "up".
2011-07-04 19:46:12 -07:00
Eric House
e207e0e142 add option to run only one game at a time in a given room. The idea
was to mimic conditions that are creating a bug on-device but it
didn't work.  Still, a useful test case....
2011-07-02 23:12:16 -07:00
Eric House
5c5708fa66 try to fix race condition that sometimes means script detects game is
over but doesn't communicate to relay: don't consider file done until
have info to sent to relay.
2011-06-30 19:37:37 -07:00
Eric House
ef9d359ab9 tweak default param values 2011-06-29 21:38:54 -07:00
Andy2
363acc228a use printf so rooms sort numerically 2011-06-28 17:38:59 -07:00
Andy2
b2a7acbdf1 remove echo 2011-06-27 18:59:36 -07:00
Andy2
3db0543994 work in absence of drop-nth-packet param 2011-06-27 18:57:27 -07:00
Andy2
8673c6a001 toward being able to verify that upgrading the relay won't hurt
in-play games: add ability to pick up games mid-play; don't sleep
before killing a device unless it's only been running less that the
minimum.
2011-06-27 18:32:30 -07:00
Andy2
a5bab1232f deal with changing connnames: use the last 2011-06-23 18:12:38 -07:00
Andy2
b4381e8403 drop-packets off, not on, by default 2011-06-22 18:17:47 -07:00
Andy2
c87df3ce16 add option to drop incoming packets randomly (rather than 1st, then
2nd, then 3rd etc.)
2011-06-20 18:55:57 -07:00
Andy2
9b4034f409 fix undefined variable by updating script before possibly deleting it 2011-06-16 18:35:08 -07:00
Andy2
3f7cd851f2 use new drop-nth-packet option, incrementing by 1 each time.
Currently this breaks the relay -- which must be fixed.
2011-06-15 06:49:15 -07:00
Eric House
cb3e33ef72 update for months-old param name changes 2011-06-14 05:46:27 -07:00
Eric House
4ae8c76959 break printed runtime into hours:minutes:seconds 2011-01-24 22:19:02 -08:00
Eric House
c4bf153d36 log reason game ended to game's logfile 2011-01-20 18:10:33 -08:00
Eric House
b3de3fc91e add --robot-iq param for testing 2011-01-10 18:18:35 -08:00
Andy2
fc23080120 param name has changed 2011-01-10 06:40:42 -08:00
Andy2
7fe5e43963 modify to use new long-only flags 2010-12-21 08:02:51 -08:00
Eric House
9fd4229384 pass host to rq too 2010-12-02 22:34:59 -08:00
Andy2
5bf87b3bea add function to invoke rq once for all the relayIDs in the set of
devices making up a game.  Actually using it make the script fail for
some reason and so it's commented out, but it helped to debug the
relay.
2010-11-23 18:12:11 -08:00
Andy2
2127394260 don't allow resignations below a certain point -- which happens to fix
divide-by-zero error.
2010-11-22 20:44:28 -08:00
Eric House
a1caaeb183 simulate games being deleted before they're finished 2010-11-18 22:27:46 -08:00
Eric House
f33466b6db exit with non-0 on failure so calling script/loop can exit too 2010-11-16 20:29:55 -08:00
Andy2
3b30aff613 use external relayID.sh script 2010-11-15 19:01:38 -08:00
Andy2
58cd93ef6f given a log file, generates an ID that can be passed with the -d
option to relay/rq.
2010-11-15 18:34:56 -08:00
Andy2
a69e2ad8be add test for device-gone notification by calling rq after gleaning
required params from logs.  So far testing only after game is over;
need to test mid-game deletion too.
2010-11-15 06:52:35 -08:00
Andy2
9026d5c149 remove obsolete script I keep accidentally invoking 2010-11-12 18:26:01 -08:00
Eric House
966616cbc4 throw in the public flags; disallow unset variables 2010-11-09 05:54:23 -08:00
Eric House
211e9ded7f TIMEOUT needs to be bigger for small NGAMES values 2010-10-18 20:18:24 -07:00
Eric House
38ae2faacc don't nuke bad files along with good 2010-10-14 22:17:34 -07:00
Eric House
c92d59fa53 games can be started with multiple dicts; saving of successful games/logs optional 2010-10-14 05:59:45 -07:00
Eric House
40a7a1b5a3 cleanup; track checked rooms rather than checking each time seen 2010-10-12 19:17:42 -07:00
Eric House
8011eeec2c cleanup; fix off-by-one bug with NAMES that was breaking runs with
four-device games; check before run that there aren't already waiting
games in db.
2010-10-12 05:17:32 -07:00
Eric House
6c5b279946 respect TIMEOUT, and kill all remaining processes before exiting 2010-10-05 20:58:29 -07:00
Andy2
31f3cbc6c8 complete rewrite: use bash's new associative arrays to track games and
pids etc. so that a single process can manage starting and stopping
all games.  Fixes race conditions where a game would be killed after
finishing but before it'd sent out the message that would allow other
games to finish.
2010-10-04 22:16:58 -07:00
Eric House
1bfdd1978e move log directory away each time 2010-09-24 20:19:12 -07:00
Andy2
35ff5a7835 exit on logdir being gone before grepping it 2010-09-23 06:41:37 -07:00
Andy2
451ced44ba cleanup: shorter timeout; set aside games that finish correctly 2010-09-23 06:29:55 -07:00
Eric House
659278448b changes to work against remote relay 2010-09-22 05:45:40 -07:00
Eric House
076b211cab tweak to allow to specify host/port for use against remote relay 2010-09-21 20:38:54 -07:00
Eric House
b6ce74be1c add timeout after which all games are killed 2010-09-20 22:08:51 -07:00
Andy2
d199ec5168 account for possibility client apps won't exit on TERM 2010-09-20 05:33:58 -07:00
Andy2
54512b9e11 put logs in own dir 2010-09-18 07:35:16 -07:00
Andy2
eec07649a6 put logs in own dir; echo every time game ends successfully. 2010-09-18 07:35:02 -07:00
Andy2
7e1066dbcc vary room names 2010-09-16 22:20:43 -07:00
Andy2
76e7459a6d various improvements, e.g. random sleeps before and after starting 2010-09-16 18:56:34 -07:00
Andy2
ca6039e890 new test script attempting to mimic real-world usage 2010-09-16 05:39:50 -07:00
Andy2
0d7165f881 add ability to run gtk from newrelay.sh. Trying to run 50 instances
crashes the relay as ACKs take too long to come back.
2010-09-16 01:44:54 -07:00
Andy2
86a1e943ca make dict settable too 2010-09-12 03:53:39 -07:00
Andy2
1cd2d542f7 new test script 2010-09-11 01:39:20 -07:00
eehouse
f501ccd946 add better missing-param messages 2010-04-20 02:39:06 +00:00
ehouse
daa84bf4e2 include date in output 2010-03-31 02:46:29 +00:00
eehouse
47f74ceef7 copy improvements from trunk, then fix to deal with missing dict and
use new -o flag.
2010-03-28 16:09:27 +00:00
ehouse
9f7c0db09f Always launch host first, sleep to make sure it'll be connected and
the room registered before launching any guests.
2009-12-04 08:56:51 +00:00
ehouse
b84c1a10d9 Use different rooms for each game. The relay, or maybe it's the linux
client's TERM handler, can't handle so many connectings on same room.
2009-11-09 05:25:20 +00:00
ehouse
8be09b3fc4 Complete script so it runs gtk versions one host at a time (after
connecting) to test the relay's new disconnected message-storing
feature.  Works except when the gtk client crashes, which is a lot.
2009-11-09 00:06:53 +00:00
ehouse
86d6f8d0a3 script and helper for testing proposed store-and-forward relay feature. 2009-11-05 04:31:23 +00:00
ehouse
84ac5223b2 script to test new feature where lots of games can use the same "room"
and will just get mached up as soon as a host and right-sized set of
guests is available.  Basically works, but will never exit if any of
the games fails to exit (as is happening most times), so still need to
detect failures.
2009-11-02 00:09:11 +00:00
ehouse
2721561324 add option to include new duplicate packets flag 2009-09-26 14:33:09 +00:00
ehouse
827f44ff48 Script to put games on relay that need partners, great for testing
with just one handheld.
2009-09-26 13:48:58 +00:00
ehouse
b1352f013c prepend Test_ to cookie/room name 2009-09-22 03:38:43 +00:00
ehouse
52055d6334 add USE_CURSES to help 2009-09-20 20:48:05 +00:00
ehouse
e8ae5e43ad don't timeout games just because they're set to sleep a long time between moves. 2009-09-17 03:41:08 +00:00
ehouse
d29b048504 timeout games after five minutes no matter what 2009-08-23 15:35:47 +00:00
ehouse
f5f5df990e Drive hosts launched from list of local roles in anticipation of
splitting tests between machines.
2009-08-21 03:31:34 +00:00
ehouse
1264cacdc1 when one participant in a game crashes kill the rest so another can
begin.
2009-08-20 11:56:33 +00:00
ehouse
522bd8636d include timestamp in "game finished ok" output 2009-07-31 13:04:37 +00:00
ehouse
7338a706cb option to randomly kill xwords instances 2009-07-29 04:31:23 +00:00
ehouse
62b7d3c3a4 Clean up gtk case and fix post-game log checking. 2009-07-28 05:02:09 +00:00
ehouse
19cff0f7c5 make all game ids (cookies) unique; fix success test 2009-07-16 04:36:30 +00:00
ehouse
fed0458f2e various improvements. Runs games forever now, though exit is clumsy. 2009-07-13 02:57:41 +00:00
ehouse
df293db349 script to run lots of games with events at more natural intervals against relay. 2009-07-12 01:18:09 +00:00
ehouse
7893c2066a get rid of gratuitous echo 2009-07-05 01:46:27 +00:00
ehouse
c0073183ba improve relay test script to better run in a loop. 2009-07-03 14:55:20 +00:00
ehouse
dbec991e9a use PID as cookie so creation order visible on relay during testing 2009-03-02 01:46:10 +00:00
ehouse
13415e895e test script, first draft. 2009-02-28 16:31:34 +00:00
ehouse
0fed666438 script for averaging results of running 'time' multiple times. 2006-08-12 02:01:57 +00:00
ehouse
5776da0b93 first checkin 2003-11-01 05:35:29 +00:00