mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-11-07 01:53:24 +09:00
[CI] (.github/workflows, docs/ci, MG_IntegrationTest, MG_IntegrationTest/Scenarios, tools/trace_replay): check verify controls by name, not by rerun
- integration-verify: drop control B, whose pair the in-lane PoisonOmitted entries already pin with a stricter check; the arming grep becomes junit_tally --require-entry-passed on the six VerifyArming, VerifyCorrupted and PoisonOmitted entries (a skip fails)
- integration-verify-split: drop the server-side-read rerun and control B; the same check covers the eight VerifySplit control entries, which assert those properties in-test
- controls A and A2 stay: nothing in-lane covers the FATAL=1 abort half or the capability field
- retrace-verify: the corrupted-snapshot control must go red with its own Fatal{PipeVerifyDiffer, "GetRenderStateParameters@"; test_run_trace_case.py proves the check on canned output
- MG_IntegrationTest/CMakeLists.txt: the comments on the VerifySplit control entries say how CI now checks them
- PoisonOmissionScenario.cpp: WithoutOmissionCompletes is described as the ambient half of the pair, and its failure note no longer names a CI step
This commit is contained in:
@@ -54,10 +54,16 @@ if canned:
|
||||
shutil.copy(os.path.join(canned, name), os.path.join(out, name))
|
||||
with open(os.path.join(out, 'retrace.log'), 'w') as log:
|
||||
log.write('stub replay\n')
|
||||
if os.environ.get('STUB_ABORT'):
|
||||
sys.exit(134)
|
||||
with open(os.path.join(out, 'result.json'), 'w') as result:
|
||||
json.dump({'passed': True, 'ssim': 1.0}, result)
|
||||
'''
|
||||
|
||||
# The retrace-verify control's reason check, as the workflow runs it on the tee'd ctest -V output.
|
||||
VERIFY_CONTROL_REASON = ("sed -E 's/^[0-9]+: //' \"$1\" | tr -s '[:space:]' ' ' "
|
||||
"| grep -qF 'Fatal{PipeVerifyDiffer, \"GetRenderStateParameters@'")
|
||||
|
||||
PREFIX = '[12:00:00] [Linux mobilegl_trace_/INFO]: '
|
||||
MARKER = {
|
||||
'inproc': 'Config: MOBILEGL_TRANSPORT=inproc - the MGPipe record stream crosses a real ring to an apply thread',
|
||||
@@ -117,7 +123,7 @@ class RunTraceCaseTests(unittest.TestCase):
|
||||
def tearDown(self):
|
||||
self.temp.cleanup()
|
||||
|
||||
def run_case(self, env, logs, tcp=False):
|
||||
def run_case(self, env, logs, tcp=False, squashed=True):
|
||||
canned = self.root / 'canned'
|
||||
shutil.rmtree(canned, ignore_errors=True)
|
||||
canned.mkdir()
|
||||
@@ -136,7 +142,8 @@ class RunTraceCaseTests(unittest.TestCase):
|
||||
command += ['-DTRACE_IPC_CONTROL=tcp://127.0.0.1:1', '-DTRACE_IPC_TOKEN=x']
|
||||
command += ['-P', str(SCRIPT)]
|
||||
result = subprocess.run(command, env=environment, capture_output=True, text=True)
|
||||
return result.returncode, squash(result.stdout + result.stderr)
|
||||
output = result.stdout + result.stderr
|
||||
return result.returncode, squash(output) if squashed else output
|
||||
|
||||
def split_env(self, transport, wire=False):
|
||||
env = {'MOBILEGL_TRANSPORT': 'spawn' if transport == 'tcp' else transport,
|
||||
@@ -264,6 +271,20 @@ class RunTraceCaseTests(unittest.TestCase):
|
||||
'MGPipe: Fatal{PipeVerifyDiffer, "GetRenderStateParameters@Clear"}')}
|
||||
self.expect_red({'MOBILEGL_PIPE_VERIFY': '1'}, logs, 'MGPipe Fatal(s) under MOBILEGL_PIPE_VERIFY')
|
||||
|
||||
def test_v4_an_aborted_verify_run_names_its_divergence(self):
|
||||
# The comparator aborts the replay before result.json, so the script dumps the library log;
|
||||
# the retrace-verify control requires that dump to carry the divergence it caused.
|
||||
fatal = 'MGPipe: Fatal{PipeVerifyDiffer, "GetRenderStateParameters@Clear"} field=3 where=entry'
|
||||
env = {'MOBILEGL_PIPE_VERIFY': '1', 'STUB_ABORT': '1'}
|
||||
rc, output = self.run_case(env, {'mobilegl.log': lines('MGPipe: verify armed', fatal)})
|
||||
self.assertNotEqual(rc, 0, output)
|
||||
transcript = self.root / 'control.txt'
|
||||
for log, expected in ((lines('MGPipe: verify armed', fatal), 0), (lines('MGPipe: verify armed'), 1)):
|
||||
_, raw = self.run_case(env, {'mobilegl.log': log}, squashed=False)
|
||||
transcript.write_text(''.join('1: ' + row + '\n' for row in raw.splitlines()))
|
||||
check = subprocess.run(['bash', '-c', VERIFY_CONTROL_REASON, 'reason', str(transcript)])
|
||||
self.assertEqual(check.returncode, expected, raw)
|
||||
|
||||
def test_v3_verify_green(self):
|
||||
rc, output = self.run_case({'MOBILEGL_PIPE_VERIFY': '1'}, {'mobilegl.log': lines('MGPipe: verify armed')})
|
||||
self.assertEqual(rc, 0, output)
|
||||
|
||||
Reference in New Issue
Block a user