[CI] (.github/workflows, scripts/ci, tools/trace_replay): check the verify control's reason in one script

- scripts/ci/retrace_verify_reason.py holds the retrace-verify control's reason check, a plain search for Fatal{PipeVerifyDiffer, "GetRenderStateParameters@ (run_trace_case.cmake prints the library log through message(STATUS), which never re-wraps, so the old prefix stripping and whitespace collapse are gone); the workflow step and test_run_trace_case.py both run it, so the test can no longer pass on a copy
- canned reds carrying a different Fatal (Fatal{UnmigratedPipeInput, "GetPixelStoreParameters@ReadPixels"}) or the comparator's divergence on another field (Fatal{PipeVerifyDiffer, "GetPixelStoreParameters@ReadPixels"}) must fail the check
This commit is contained in:
2026-10-17 17:13:51 -04:00
parent 9eb92f83c9
commit d98f183eba
3 changed files with 64 additions and 14 deletions
+49
View File
@@ -0,0 +1,49 @@
#!/usr/bin/env python3
# MobileGL - scripts/ci/retrace_verify_reason.py
# Copyright (c) 2025-2026 MobileGL-Dev
# Licensed under the GNU Lesser General Public License v3.0:
# https://www.gnu.org/licenses/gpl-3.0.txt
# https://www.gnu.org/licenses/lgpl-3.0.txt
# SPDX-License-Identifier: LGPL-3.0-only
# End of Source File Header
"""Whether retrace-verify's corrupted-snapshot control went red for its own reason.
The control replays OpenRA with MOBILEGL_PIPE_VERIFY_CORRUPT=GetRenderStateParameters and must go
red with the comparator's divergence on that field: a red without it (another Fatal, a divergence
on another field) proves nothing about the comparator. The check requires that divergence in the
transcript; it does not rule out other failures beside it. run_trace_case.cmake prints the library
log through message(STATUS), which never re-wraps, so each log line stays one transcript line.
Usage: retrace_verify_reason.py TRANSCRIPT (the control run's ctest -V output)
Exit 0 when the divergence is there, 1 when it is not, 2 when the transcript cannot be read.
"""
import sys
REASON = 'Fatal{PipeVerifyDiffer, "GetRenderStateParameters@'
def carries_reason(text):
return REASON in text
def main(argv=None):
argv = sys.argv[1:] if argv is None else argv
if len(argv) != 1:
print(__doc__)
return 2
try:
text = open(argv[0], encoding='utf-8', errors='replace').read()
except OSError as error:
print(f'::error::retrace_verify_reason: cannot read {argv[0]}: {error}')
return 2
if carries_reason(text):
print(f'retrace_verify_reason: the red carries {REASON}...')
return 0
print(f'::error::the corrupted-snapshot retrace went red without {REASON}...: '
'something other than the comparator failed it')
return 1
if __name__ == '__main__':
sys.exit(main())