Skip to content

Commit

Permalink
More granular grouping of linker errors
Browse files Browse the repository at this point in the history
  • Loading branch information
vejbomar committed Jan 30, 2025
1 parent 72999a7 commit 8ef513f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/scripts/boost/group_test_failures.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ def process_logs(log_file: str) -> None:
input()

grouping = collections.defaultdict(int)
grouping_linker_undef_refs = collections.defaultdict(int)
for output in failed_outputs:
error_line_index = find_failed_line_index(output) - 1
assert error_line_index >= 0
Expand All @@ -118,6 +119,10 @@ def process_logs(log_file: str) -> None:
grouping[f"{command}: {line}"] += 1
break
continue

if output[0].startswith("gcc.link") and "undefined reference to" in output[5]:
str_index = output[5].index("undefined reference to")
grouping_linker_undef_refs[f"{command}: {output[5][str_index:]}"] += 1

if output[error_line_index] == ("====== END OUTPUT ======"):
for i, line in enumerate(output):
Expand All @@ -140,6 +145,10 @@ def process_logs(log_file: str) -> None:
print(f"Grouping per error message:")
print_dict_sorted_by_values(grouping)

input()
print(f"Grouping per linker error message:")
print_dict_sorted_by_values(grouping_linker_undef_refs)

def main() -> None:
parser = argparse.ArgumentParser(description="Aggregate test results from log files")
parser.add_argument("--log_file", required=True, type=str, help="Path to the log file")
Expand Down

0 comments on commit 8ef513f

Please sign in to comment.