diff --git a/tools/gh_parse.py b/tools/gh_parse.py index 4e417dcf0a..3425aa3e79 100755 --- a/tools/gh_parse.py +++ b/tools/gh_parse.py @@ -518,12 +518,14 @@ def key(column): per_testkey_result = simplified_results.pop(test_key) table = [] + summary = {} for test_key, items in simplified_results.items(): package_name, testname = test_key status = "??" for action in ACTIONS_WITH_ICON: if action in items.values(): - status = action[:2] + status, info = action[:2], action[2:] + summary[info] = summary.get(info, 0) + 1 break items_proc = dict((k, short_action(v)) for (k, v) in items.items()) table.append( @@ -535,7 +537,8 @@ def key(column): ) table_txt = format_table(table, markdown=markdown) if len(table) > 5: - table_txt = wrap_in_details(table_txt, f"{len(table)} failing tests:") + summary_msg = make_summary_message(table, summary) + table_txt = wrap_in_details(table_txt, summary_msg) if table_txt: print(table_txt) @@ -584,6 +587,13 @@ def key(column): print() +def make_summary_message(table, summary): + items = list(summary.items()) + items.sort(key=lambda x: x[1], reverse=True) + items = ", ".join(f"{count} {info}" for (info, count) in items) + return f"{len(table)} interesting tests: " + items + + # For test table, use shorter version of action. # We have full action name in env table, so that is used as agenda. def short_action(action):