diff options
author | dkegel@google.com <dkegel@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-20 17:32:56 +0000 |
---|---|---|
committer | dkegel@google.com <dkegel@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-20 17:32:56 +0000 |
commit | a74c5c158304362c4da57e875917067a8ed6d48a (patch) | |
tree | ff742a097d5a256d2c628fca003a9427adcc480c /tools/valgrind/valgrind_test.py | |
parent | a5202c98ef96a71be304140e0f2cc2dc81577be5 (diff) | |
download | chromium_src-a74c5c158304362c4da57e875917067a8ed6d48a.zip chromium_src-a74c5c158304362c4da57e875917067a8ed6d48a.tar.gz chromium_src-a74c5c158304362c4da57e875917067a8ed6d48a.tar.bz2 |
Add --show_all_leaks option.
Add --gtest_print_time option to valgrind_test.py and use it always in chrome_test.py, since we probably want to keep an eye out for tests that are too slow for valgrind.
Review URL: http://codereview.chromium.org/50055
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12194 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/valgrind/valgrind_test.py')
-rwxr-xr-x | tools/valgrind/valgrind_test.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/tools/valgrind/valgrind_test.py b/tools/valgrind/valgrind_test.py index 4afb714..0910e0c 100755 --- a/tools/valgrind/valgrind_test.py +++ b/tools/valgrind/valgrind_test.py @@ -56,6 +56,12 @@ class Valgrind(object): help="path to a valgrind suppression file") self._parser.add_option("", "--gtest_filter", default="", help="which test case to run") + self._parser.add_option("", "--gtest_print_time", action="store_true", + default=False, + help="show how long each test takes") + self._parser.add_option("", "--show_all_leaks", action="store_true", + default=False, + help="also show less blatant leaks") self._parser.add_option("", "--generate_suppressions", action="store_true", default=False, help="Skip analysis and generate suppressions") @@ -72,6 +78,8 @@ class Valgrind(object): self._source_dir = self._options.source_dir if self._options.gtest_filter != "": self._args.append("--gtest_filter=%s" % self._options.gtest_filter) + if self._options.gtest_print_time: + self._args.append("--gtest_print_time"); if self._options.verbose: google.logging_utils.config_root(logging.DEBUG) else: @@ -108,7 +116,7 @@ class Valgrind(object): def Analyze(self): # Glob all the files in the "valgrind.tmp" directory filenames = glob.glob(self.TMP_DIR + "/valgrind.*") - analyzer = valgrind_analyze.ValgrindAnalyze(self._source_dir, filenames) + analyzer = valgrind_analyze.ValgrindAnalyze(self._source_dir, filenames, self._options.show_all_leaks) return analyzer.Report() def Cleanup(self): @@ -167,6 +175,9 @@ class ValgrindLinux(Valgrind): proc = ["valgrind", "--smc-check=all", "--leak-check=full", "--num-callers=30"] + if self._options.show_all_leaks: + proc += ["--show-reachable=yes"]; + # Either generate suppressions or load them. if self._generate_suppressions: proc += ["--gen-suppressions=all"] |