gh-115720: Show number of leaks in huntrleaks progress reports (GH-115726)

Instead of showing a dot for each iteration, show:
- '.' for zero (on negative) leaks
- number of leaks for 1-9
- 'X' if there are more leaks

This allows more rapid iteration: when bisecting, I don't need
to wait for the final report to see if the test still leaks.

Also, show the full result if there are any non-zero entries.
This shows negative entries, for the unfortunate cases where
a reference is created and cleaned up in different runs.

Test *failure* is still determined by the existing heuristic.
This commit is contained in:
Petr Viktorin 2024-02-27 09:51:17 +01:00 committed by GitHub
parent 6087315926
commit af5f9d682c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 39 additions and 14 deletions

View file

@ -1171,8 +1171,8 @@ class ArgsTestCase(BaseTestCase):
stderr=subprocess.STDOUT)
self.check_executed_tests(output, [test], failed=test, stats=1)
line = 'beginning 6 repetitions\n123456\n......\n'
self.check_line(output, re.escape(line))
line = r'beginning 6 repetitions. .*\n123:456\n[.0-9X]{3} 111\n'
self.check_line(output, line)
line2 = '%s leaked [1, 1, 1] %s, sum=3\n' % (test, what)
self.assertIn(line2, output)