mirror of
https://github.com/lowRISC/ibex.git
synced 2025-04-24 05:47:36 -04:00
[dv] Handle missing paths when producing regression log
It's possible for a TestRunResult to contain an entry that has a path to a build/run artifact but for that to be None rather than an actual path. This causes the collect_results.py script to fail. With this change such paths will be described as 'MISSING' in the regression log instead.
This commit is contained in:
parent
63fa98537e
commit
15945049b2
1 changed files with 6 additions and 4 deletions
|
@ -38,10 +38,12 @@ def gen_test_run_result_text(trr: TestRunResult) -> str:
|
|||
test_underline = '-' * len(test_name_idx)
|
||||
info_lines: List[str] = [test_name_idx, test_underline]
|
||||
|
||||
# Filter out relevant fields, and print as relative to the dir_test for readability
|
||||
lesskeys = {k: str(v.relative_to(trr.dir_test)) # Improve readability
|
||||
for k, v in dataclasses.asdict(trr).items()
|
||||
if k in ['binary', 'rtl_log', 'rtl_trace', 'iss_cosim_trace']}
|
||||
# Filter out relevant fields, and print as relative to the dir_test for
|
||||
# readability.
|
||||
lesskeys = \
|
||||
{k: str(v.relative_to(trr.dir_test) if v is not None else 'MISSING')
|
||||
for k, v in dataclasses.asdict(trr).items()
|
||||
if k in ['binary', 'rtl_log', 'rtl_trace', 'iss_cosim_trace']}
|
||||
strdict = ibex_lib.format_dict_to_printable_dict(lesskeys)
|
||||
|
||||
trr_yaml = io.StringIO()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue