diff --git a/opendbc/car/nissan/carcontroller.py b/opendbc/car/nissan/carcontroller.py index 42f693a2b16..ad0717267c6 100644 --- a/opendbc/car/nissan/carcontroller.py +++ b/opendbc/car/nissan/carcontroller.py @@ -22,6 +22,7 @@ def __init__(self, dbc_names, CP): self.packer = CANPacker(dbc_names[Bus.pt]) def update(self, CC, CS, now_nanos): + raise RuntimeError("car_diff error dropdown test") # TODO: remove, intentional failure to exercise car_diff error reporting actuators = CC.actuators hud_control = CC.hudControl pcm_cancel_cmd = CC.cruiseControl.cancel diff --git a/opendbc/car/tests/car_diff.py b/opendbc/car/tests/car_diff.py index b4424be8975..37d82314056 100755 --- a/opendbc/car/tests/car_diff.py +++ b/opendbc/car/tests/car_diff.py @@ -293,8 +293,11 @@ def main(platform: str | None = None, segments_per_platform: int = 10, update_re icon = "⚠️" if with_diffs else "✅" print(f"\n{icon} {len(with_diffs)} changed, {n_passed} passed, {len(errors)} errors") - for plat, seg, err in errors: - print(f"\nERROR {plat} - {seg}: {err}") + if errors: + print("
Show errors\n\n```") + for err in dict.fromkeys(err for _, _, err in errors): + print(f"\n{err}") + print("```\n
") if with_diffs: print("
Show changes\n\n```")