Skip to content

Commit a09f3dd

Browse files
committed
Bugfix: when displaying extra summary using -t option some indexes are not found and dictionary must be checked against key
1 parent 278acbe commit a09f3dd

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

workspace_tools/test_api.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -370,12 +370,14 @@ def generate_test_summary_by_target(self, test_summary, shuffle_seed=None):
370370
pt.padding_width = 1 # One space between column edges and contents (default)
371371

372372
for test in unique_tests:
373-
test_results = result_dict[test]
374-
row = [target, test, unique_test_desc[test]]
375-
for toolchain in unique_toolchains:
376-
if toolchain in test_results:
377-
row.append(test_results[toolchain])
378-
pt.add_row(row)
373+
if test in result_dict:
374+
test_results = result_dict[test]
375+
if test in unique_test_desc:
376+
row = [target, test, unique_test_desc[test]]
377+
for toolchain in unique_toolchains:
378+
if toolchain in test_results:
379+
row.append(test_results[toolchain])
380+
pt.add_row(row)
379381
result += pt.get_string()
380382
shuffle_seed_text = "Shuffle Seed: %.*f"% (self.SHUFFLE_SEED_ROUND,
381383
shuffle_seed if shuffle_seed else self.shuffle_random_seed)

0 commit comments

Comments
 (0)