Use new log domain for ai test scripts to determine faction.
This commit is contained in:
parent
83d2f8d862
commit
2290e3d6b2
4 changed files with 7 additions and 7 deletions
|
@ -1,6 +1,6 @@
|
|||
[default]
|
||||
path_to_wesnoth_binary=../../wesnoth-debug ../..
|
||||
arguments_to_wesnoth_binary=--log-info=ai/testing --nogui --multiplayer --controller1=ai --controller2=ai
|
||||
arguments_to_wesnoth_binary=--log-info=ai/testing,mp/connect --nogui --multiplayer --controller1=ai --controller2=ai
|
||||
number_of_tests=10000
|
||||
ai_config1=ai/ais/formula_ai.cfg
|
||||
ai_config2=ai/ais/default_ai.cfg
|
||||
|
|
|
@ -44,7 +44,7 @@ def construct_command_line(cfg,ai1,ai2,f1,f2,map):
|
|||
optmap=''
|
||||
else:
|
||||
optmap='--scenario='+map
|
||||
|
||||
|
||||
return wesnoth+' '+options+' '+optmap+' '+ai_config1+' '+ai_config2
|
||||
|
||||
def do_filter(str,substring):
|
||||
|
@ -106,13 +106,13 @@ def run_game(cfg,game_result):
|
|||
game_result.ai_ident2 = s.strip()
|
||||
continue
|
||||
|
||||
n,s = do_filter(str,'info ai/testing: FACTION1:')
|
||||
n,s = do_filter(str,'info mp/connect: FACTION1:')
|
||||
if (n>-1):
|
||||
#print 'AND THE FACTION1 IS: '+s
|
||||
game_result.faction1 = s
|
||||
continue
|
||||
|
||||
n,s = do_filter(str,'info ai/testing: FACTION2:')
|
||||
n,s = do_filter(str,'info mp/connect: FACTION2:')
|
||||
if (n>-1):
|
||||
#print 'AND THE FACTION2 IS: '+s
|
||||
game_result.faction2 = s
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[default]
|
||||
path_to_wesnoth_binary=../../wesnoth
|
||||
arguments_to_wesnoth_binary=--log-info=ai/testing --nogui --multiplayer --controller1=ai --controller2=ai
|
||||
arguments_to_wesnoth_binary=--log-info=ai/testing,mp/connect --nogui --multiplayer --controller1=ai --controller2=ai
|
||||
number_of_tests=400
|
||||
ai_config1=ai/ais/default_ai.cfg
|
||||
ai_config2=ai/ais/default_ai.cfg
|
||||
|
|
|
@ -106,13 +106,13 @@ def run_game(cfg,game_result):
|
|||
game_result.ai_ident2 = s.strip()
|
||||
continue
|
||||
|
||||
n,s = do_filter(str,'info ai/testing: FACTION1:')
|
||||
n,s = do_filter(str,'info mp/connect: FACTION1:')
|
||||
if (n>-1):
|
||||
#print 'AND THE FACTION1 IS: '+s
|
||||
game_result.faction1 = s
|
||||
continue
|
||||
|
||||
n,s = do_filter(str,'info ai/testing: FACTION2:')
|
||||
n,s = do_filter(str,'info mp/connect: FACTION2:')
|
||||
if (n>-1):
|
||||
#print 'AND THE FACTION2 IS: '+s
|
||||
game_result.faction2 = s
|
||||
|
|
Loading…
Add table
Reference in a new issue