mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-30 08:34:16 +01:00
tweaks to test script
Make fewer games with > 2 players, as that's rare. Fix calculation of total number of launches to include games that have ended.
This commit is contained in:
parent
ff82aa4251
commit
ca54371515
1 changed files with 9 additions and 5 deletions
|
@ -9,6 +9,7 @@ import argparse, datetime, random, signal, subprocess, time
|
||||||
# APP_NEW_PARAMS=""
|
# APP_NEW_PARAMS=""
|
||||||
# NGAMES = 1
|
# NGAMES = 1
|
||||||
g_UDP_PCT_START = 100
|
g_UDP_PCT_START = 100
|
||||||
|
gDeadLaunches = 0
|
||||||
# UDP_PCT_INCR=10
|
# UDP_PCT_INCR=10
|
||||||
# UPGRADE_ODDS=""
|
# UPGRADE_ODDS=""
|
||||||
# NROOMS=""
|
# NROOMS=""
|
||||||
|
@ -104,9 +105,9 @@ g_NAMES = [None, 'Brynn', 'Ariela', 'Kati', 'Eric']
|
||||||
|
|
||||||
def pick_ndevs(args):
|
def pick_ndevs(args):
|
||||||
RNUM = random.randint(0, 99)
|
RNUM = random.randint(0, 99)
|
||||||
if RNUM > 90 and args.MAXDEVS >= 4:
|
if RNUM > 95 and args.MAXDEVS >= 4:
|
||||||
NDEVS = 4
|
NDEVS = 4
|
||||||
elif RNUM > 75 and args.MAXDEVS >= 3:
|
elif RNUM > 90 and args.MAXDEVS >= 3:
|
||||||
NDEVS = 3
|
NDEVS = 3
|
||||||
else:
|
else:
|
||||||
NDEVS = 2
|
NDEVS = 2
|
||||||
|
@ -259,9 +260,11 @@ class Device():
|
||||||
self.check_game()
|
self.check_game()
|
||||||
|
|
||||||
def handleAllDone(self):
|
def handleAllDone(self):
|
||||||
|
global gDeadLaunches
|
||||||
if self.allDone:
|
if self.allDone:
|
||||||
self.moveFiles()
|
self.moveFiles()
|
||||||
self.send_dead()
|
self.send_dead()
|
||||||
|
gDeadLaunches += self.launchCount
|
||||||
return self.allDone
|
return self.allDone
|
||||||
|
|
||||||
def moveFiles(self):
|
def moveFiles(self):
|
||||||
|
@ -635,6 +638,7 @@ def build_cmds(args):
|
||||||
# }
|
# }
|
||||||
|
|
||||||
def summarizeTileCounts(devs, endTime, state):
|
def summarizeTileCounts(devs, endTime, state):
|
||||||
|
global gDeadLaunches
|
||||||
shouldGoOn = True
|
shouldGoOn = True
|
||||||
data = [dev.getTilesCount() for dev in devs]
|
data = [dev.getTilesCount() for dev in devs]
|
||||||
nDevs = len(data)
|
nDevs = len(data)
|
||||||
|
@ -660,7 +664,7 @@ def summarizeTileCounts(devs, endTime, state):
|
||||||
games[-1].append('{:0{width}d}'.format(datum['index'], width=colWidth))
|
games[-1].append('{:0{width}d}'.format(datum['index'], width=colWidth))
|
||||||
fmtData[0]['data'] = ['+'.join(game) for game in games]
|
fmtData[0]['data'] = ['+'.join(game) for game in games]
|
||||||
|
|
||||||
nLaunches = 0
|
nLaunches = gDeadLaunches
|
||||||
for datum in data:
|
for datum in data:
|
||||||
launchCount = datum['launchCount']
|
launchCount = datum['launchCount']
|
||||||
nLaunches += launchCount
|
nLaunches += launchCount
|
||||||
|
|
Loading…
Add table
Reference in a new issue