Commit Graph

2 Commits

Author SHA1 Message Date
85149ce1a7 conformance: harden unexpected input and crash paths
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-11-29 10:24:27 +00:00
99468371e8 conformance/compare.py: import traceback, so an unexpected crash exits 2 and not the mismatch code 1
main()'s catch-all calls traceback.print_exc(), but the module never imported traceback. Any
exception a handler did not anticipate therefore raised NameError inside the except block, which
escaped main() and made Python exit 1: the code that means "the run completed and found a
mismatch". A calling script could not tell a crash from differing pixels.

tests/test_conformance_compare_crash.py makes a handler raise and checks both main()'s return
value and the exit status of the script (2, with the traceback and the "bug in compare.py" line,
and no NameError).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 9aece26a3e)
2026-11-24 16:51:43 -05:00