From 61c73e2823a96a3bc47da42eedff4e13f9aaa9ff Mon Sep 17 00:00:00 2001 From: Rupert Swarbrick Date: Thu, 4 Jun 2026 12:38:55 +0100 Subject: [PATCH] fix: Improve error message when failing to parse a testplan This way, the error message at the bottom of the console log is rather more helpful. In the example I just ran: RuntimeError: Error when parsing testplan at /home/rjs/work/opentitan/hw/top_earlgrey/data/chip_testplan.hjson: The otp_mutate field in the testplan element with name manuf_cp_unlock_raw is neither a string nor a list of strings. Signed-off-by: Rupert Swarbrick --- src/dvsim/testplan.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dvsim/testplan.py b/src/dvsim/testplan.py index 6d1b8e86..33dbe6e0 100644 --- a/src/dvsim/testplan.py +++ b/src/dvsim/testplan.py @@ -451,7 +451,7 @@ def __init__(self, tagged_filename: str, repo_top: Path, name: str) -> None: try: self._parse_testplan(filename, tags, repo_top) except Exception as e: - msg = f"Error when parsing testplan at {filename}." + msg = f"Error when parsing testplan at {filename}: {e}" raise RuntimeError(msg) from e # Represents current progress towards each stage. Stage = N.A.