Fix blank mission results panel; record Workshop 0.0.127
continuous-integration/drone/push Build is passing
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Frozen local Workbench community-statistics fixture; no live server or installed asset writes."""
|
||||
from pathlib import Path
|
||||
import hashlib,json,shutil,subprocess,sys,os,time
|
||||
import hashlib,json,shutil,subprocess,sys,os,time,re
|
||||
ROOT=Path(__file__).resolve().parents[3]
|
||||
sys.path.insert(0,str(ROOT/'tools'))
|
||||
from source_manifest import addon_manifest
|
||||
@@ -40,8 +40,20 @@ with (profile/'runner-output.log').open('w') as output:
|
||||
result=subprocess.Popen(command,stdout=output,stderr=subprocess.STDOUT)
|
||||
captured=False
|
||||
while result.poll() is None:
|
||||
if not captured and any('ERR STATS UI READY' in log.read_text(errors='replace') for log in (profile/'logs').glob('*/console.log')):
|
||||
if not captured and ((profile/'profile/results-ready.json').exists() or any('ERR STATS UI READY' in log.read_text(errors='replace') for log in (profile/'logs').glob('*/console.log'))):
|
||||
# The owned runner logs its private Gamescope display. Wine may rewrite its
|
||||
# command line, so /proc project-path matching alone can miss the renderer.
|
||||
launch=profile/'headless-launch.log'
|
||||
displays=re.findall(r'Starting Xwayland on (:\d+)',launch.read_text(errors='replace')) if launch.exists() else []
|
||||
if displays:
|
||||
try:
|
||||
capture=subprocess.run(['import','-display',displays[-1],'-window','root',str(profile/'results-desktop.png')],stdout=subprocess.DEVNULL,stderr=subprocess.PIPE,timeout=5)
|
||||
(profile/'capture.log').write_bytes(capture.stderr)
|
||||
captured=capture.returncode==0
|
||||
except subprocess.TimeoutExpired:
|
||||
(profile/'capture.log').write_text('Private display capture timed out.\n')
|
||||
for proc in Path('/proc').iterdir():
|
||||
if captured: break
|
||||
if not proc.name.isdigit(): continue
|
||||
try:
|
||||
args=(proc/'cmdline').read_bytes().decode(errors='replace').replace('\\', '/')
|
||||
|
||||
Reference in New Issue
Block a user