Files
StarPilot/system/tests/test_tombstoned.py
T
firestar5683 a08fe79cef fixes
2026-07-06 22:32:54 -05:00

25 lines
781 B
Python

from openpilot.system import tombstoned
def test_report_tombstone_apport_ignores_hal3_direct_widthfix(tmp_path, monkeypatch):
crash = tmp_path / "_data_agnos-compat_bin_hal3_direct_widthfix.0.crash"
crash.write_text("\n".join([
"ProblemType: Crash",
"ExecutablePath: /data/agnos-compat/bin/hal3_direct_widthfix",
"Signal: 11",
"CoreDump: base64",
]))
sentry_calls = []
monkeypatch.setattr(tombstoned.sentry, "report_tombstone", lambda *args: sentry_calls.append(args))
def fail_retrace(fn):
raise AssertionError(f"ignored tombstones should not be retraced: {fn}")
monkeypatch.setattr(tombstoned, "get_apport_stacktrace", fail_retrace)
tombstoned.report_tombstone_apport(str(crash))
assert sentry_calls == []
assert not crash.exists()