Expand independent escape routes and finite site discovery
This commit is contained in:
@@ -10,7 +10,7 @@ p = argparse.ArgumentParser(description=__doc__)
|
||||
p.add_argument('--steam', type=Path, default=Path.home()/'.local/share/Steam')
|
||||
p.add_argument('--compat', type=Path, required=True, help='Disposable cloned Proton compatdata directory outside Steam')
|
||||
p.add_argument('--profile', type=Path, required=True, help='Separate disposable successor Workbench profile')
|
||||
p.add_argument('--smoke', choices=['victory', 'lost-helicopter', 'player-death', 'radio-network', 'hq-response', 'mortar-inventory', 'startup-failure'], default='victory')
|
||||
p.add_argument('--smoke', choices=['victory', 'lost-helicopter', 'player-death', 'radio-network', 'hq-response', 'mortar-inventory', 'startup-failure', 'site-survey', 'cache-loss'], default='victory')
|
||||
p.add_argument('--rounds', type=int, default=2)
|
||||
p.add_argument('--timeout', type=int, default=360)
|
||||
p.add_argument('--project', choices=['core', 'chat'], default='chat', help='Core-only base or full companion integration')
|
||||
@@ -49,10 +49,11 @@ for proc in Path('/proc').iterdir():
|
||||
except (FileNotFoundError, PermissionError, ProcessLookupError): pass
|
||||
command = ['gamescope', '--backend', 'headless', '-W', '1280', '-H', '720', '-w', '1280', '-h', '720', '-r', '30', '--', str(proton), 'run', str(wb/'ArmaReforgerWorkbenchSteamDiag.exe'), '-gproj', 'Z:'+str(ROOT/'addons'/a.project/'addon.gproj'), '-addonsDir', 'Z:'+str(ROOT/'addons'), '-profile', profile_arg, '-logconsole', '-wbModule=WorldEditor', '-load', 'Worlds/ERR_Everon.ent', '-plugin=ERR_ValidateWorldPlugin', '-errPlay', '1', '-errSmoke', '1', '-errSmokeOutcome', a.smoke, '-noThrow']
|
||||
if a.project == 'core':
|
||||
if a.smoke not in {'victory', 'startup-failure'}: p.error('Core-only fixture supports victory and startup-failure')
|
||||
if a.smoke not in {'victory', 'startup-failure', 'site-survey', 'cache-loss'}: p.error('Core-only fixture supports victory, cache-loss, startup-failure and site-survey')
|
||||
command[command.index('-plugin=ERR_ValidateWorldPlugin')] = '-plugin=ERR_ValidateBaseWorldPlugin'
|
||||
command[command.index('-errSmoke')] = '-errBaseSmoke'
|
||||
if a.smoke == 'startup-failure' and (a.project != 'core' or a.rounds != 1): p.error('startup-failure requires --project core --rounds 1')
|
||||
if a.smoke == 'cache-loss' and a.project != 'core': p.error('Cache loss requires --project core')
|
||||
if a.smoke in {'startup-failure', 'site-survey'} and (a.project != 'core' or a.rounds != 1): p.error('This diagnostic requires --project core --rounds 1')
|
||||
env = os.environ.copy()
|
||||
env.update(STEAM_COMPAT_DATA_PATH=str(compat), STEAM_COMPAT_CLIENT_INSTALL_PATH=str(steam), WINEPREFIX=str(compat/'pfx'))
|
||||
# A test-only sink prevents startup sounds; a stream check also catches a saved
|
||||
|
||||
@@ -7,12 +7,13 @@ p=argparse.ArgumentParser(description=__doc__)
|
||||
p.add_argument('mode',choices=['workbench','server'])
|
||||
p.add_argument('--exe',required=True,type=Path)
|
||||
p.add_argument('--profile',required=True,type=Path)
|
||||
p.add_argument('--smoke',choices=['victory','lost-helicopter','player-death', 'radio-network', 'hq-response', 'mortar-inventory'],help='Opt-in Workbench test; use a disposable profile')
|
||||
p.add_argument('--smoke',choices=['victory','lost-helicopter','player-death', 'radio-network', 'hq-response', 'mortar-inventory', 'cache-loss', 'startup-failure', 'site-survey'],help='Opt-in Workbench test; use a disposable profile')
|
||||
p.add_argument('--execute',action='store_true',help='Deliberately execute the command; Workbench opens a window')
|
||||
p.add_argument('--visible-output',help='User-approved spare display; required when executing Workbench')
|
||||
p.add_argument('--project',choices=['core','chat'],default='chat')
|
||||
a=p.parse_args()
|
||||
if a.smoke and a.mode!='workbench':p.error('Scripted smoke is compiled only for Workbench')
|
||||
if a.smoke in {'cache-loss', 'startup-failure', 'site-survey'} and a.project!='core':p.error('This fixture requires Core')
|
||||
if a.execute and a.mode=='workbench' and not a.visible_output:
|
||||
p.error('Workbench opens windows. Select/configure a spare display and supply --visible-output first.')
|
||||
command=[str(a.exe),'-addonsDir',str(ROOT/'addons'),'-profile',str(a.profile),'-logconsole']
|
||||
@@ -20,7 +21,7 @@ if a.mode=='workbench':
|
||||
command+=['-gproj',str(ROOT/'addons'/a.project/'addon.gproj'),'-wbModule=WorldEditor','-load','Worlds/ERR_Everon.ent']
|
||||
if a.smoke:command+=['-plugin','ERR_ValidateWorldPlugin','-errPlay','1','-errSmoke','1','-errSmokeOutcome',a.smoke]
|
||||
if a.project=='core' and a.smoke:
|
||||
if a.smoke!='victory':p.error('Core-only fixture currently supports victory')
|
||||
if a.smoke not in {'victory', 'cache-loss', 'startup-failure', 'site-survey'}:p.error('Unsupported Core-only fixture')
|
||||
command[command.index('ERR_ValidateWorldPlugin')]='ERR_ValidateBaseWorldPlugin'
|
||||
command[command.index('-errSmoke')]='-errBaseSmoke'
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user