schrodinger.test.memtest module¶
Parse and analyze valgrind output and suppressions.
- class schrodinger.test.memtest.Suppression(error_type, suppressions, title='')¶
Bases:
object
Represent a suppression for a leak found by valgrind.
- classmethod read(fh, ignore_existing_title=True)¶
- __init__(error_type, suppressions, title='')¶
- class schrodinger.test.memtest.ValgrindWarning(command, warnings)¶
Bases:
object
- __init__(command, warnings)¶
- class schrodinger.test.memtest.Leak(filename, command, description, backtrace=None, suppression=None)¶
Bases:
object
Represent a Valgrind Leak.
- classmethod read(description, fh, command=None, filename=None)¶
- __init__(filename, command, description, backtrace=None, suppression=None)¶
- schrodinger.test.memtest.read_valgrind_log(filename, fh)¶
Read a valgrind log
- schrodinger.test.memtest.discover_leaks(directory, verbose=False)¶
Search a directory for valgrind log files.
- Return type
dict
- Returns
Key: directory path, Value: list of unique leaks seen in that directory
- schrodinger.test.memtest.simplify(suppression)¶
Remove test code from suppression. Wildcard any absolute paths.
- schrodinger.test.memtest.uniquify_leaks(leaks)¶
Given a list of Leak objects, remove any duplicates. Duplicates include leaks that are wholly included in another leak.
- schrodinger.test.memtest.uniquify_suppression_titles(leaks)¶
Make sure that each suppression has a unique title.
- schrodinger.test.memtest.read_and_uniquify(filename)¶
Read a suppression file and make the suppressions in it unique.