Meta: Let test_pdf.py print number of files without problems

This commit is contained in:
Nico Weber 2023-11-05 22:46:37 +01:00 committed by Andreas Kling
parent 30ea218e35
commit 1ce422db08
Notes: sideshowbarker 2024-07-16 21:39:23 +09:00

View File

@ -59,6 +59,7 @@ def main():
results = multiprocessing.Pool().map(test_pdf, files)
num_files_without_issues = 0
failed_files = []
num_crashes = 0
stack_to_files = {}
@ -66,6 +67,8 @@ def main():
print(r.filename)
print(r.stdout.decode('utf-8'))
if r.returncode == 0:
if b'no issues found' in r.stdout:
num_files_without_issues += 1
continue
if r.returncode == 1:
failed_files.append(r.filename)
@ -84,6 +87,10 @@ def main():
print(f' {file}')
print()
percent = 100 * num_files_without_issues / len(results)
print(f'{num_files_without_issues} files without issues ({percent:.1f}%)')
print()
percent = 100 * num_crashes / len(results)
print(f'{num_crashes} crashes ({percent:.1f}%)')
print(f'{len(keys)} distinct crash stacks')