1
0
mirror of https://github.com/SerenityOS/serenity synced 2024-07-05 20:34:56 +00:00

Meta: Let test_pdf.py be less dramatic about issue counts

For every issue string, json['issues'][issue_string] contains a list
of (page, count_of_issue_on_this_page) tuples.

To get the total number the issue appears in the current document,
we need to add up all the count_of_issue_on_this_page, not multiply the
page number with count_of_issue_on_this_page and add those (-‸ლ)
This commit is contained in:
Nico Weber 2024-01-09 19:50:21 -05:00 committed by Andreas Kling
parent 0befa77b99
commit 822b7720e1

View File

@ -92,7 +92,7 @@ def main():
issue.filenames.append(r.filename)
issue.filename_to_issues[r.filename] = j['issues'][diag]
issue.num_pages += len(j['issues'][diag])
issue.count += sum(a * b for (a, b) in j['issues'][diag])
issue.count += sum(count for (page, count) in j['issues'][diag])
continue
if r.returncode == 1:
failed_files.append(r.filename)