Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions tools/gh_parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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)

Expand Down Expand Up @@ -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):
Expand Down