diff options
author | Craig Tiller <ctiller@google.com> | 2015-02-18 13:37:06 -0800 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2015-02-18 13:37:06 -0800 |
commit | 1a305b1d9dc19910ad81df88f494cf282747bc54 (patch) | |
tree | d30831f9d872fbcd716f3b37854ec470e6f1f085 | |
parent | 7326901767e0f12e27df8da7524d57ea53eb1fc2 (diff) |
Make valgrind a bit more useful
-rwxr-xr-x | tools/run_tests/run_tests.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index 72a4b0cd12..64478b3753 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -62,15 +62,18 @@ class SimpleConfig(object): # ValgrindConfig: compile with some CONFIG=config, but use valgrind to run class ValgrindConfig(object): - def __init__(self, config, tool): + def __init__(self, config, tool, args=[]): self.build_config = config self.tool = tool + self.args = args self.maxjobs = 2 * multiprocessing.cpu_count() self.allow_hashing = False def job_spec(self, binary, hash_targets): - return jobset.JobSpec(cmdline=['valgrind', '--tool=%s' % self.tool, binary], - hash_targets=None) + return jobset.JobSpec(cmdline=['valgrind', '--tool=%s' % self.tool] + + self.args + [binary], + shortname='valgrind %s' % binary, + hash_targets=None) class CLanguage(object): @@ -144,7 +147,7 @@ _CONFIGS = { 'asan': SimpleConfig('asan', environ={ 'ASAN_OPTIONS': 'detect_leaks=1:color=always:suppressions=tools/tsan_suppressions.txt'}), 'gcov': SimpleConfig('gcov'), - 'memcheck': ValgrindConfig('valgrind', 'memcheck'), + 'memcheck': ValgrindConfig('valgrind', 'memcheck', ['--leak-check=full']), 'helgrind': ValgrindConfig('dbg', 'helgrind') } |