diff options
author | dkegel@google.com <dkegel@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-17 20:26:14 +0000 |
---|---|---|
committer | dkegel@google.com <dkegel@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-17 20:26:14 +0000 |
commit | 4a9717e2030aadf15cb62275ed0f4ff1a37e869f (patch) | |
tree | a9eafba9cfa18bf2a90ec2e9196e26b252f62f5b /tools/valgrind/valgrind_test.py | |
parent | e0242814df51e5b8bd91149219774c981a0934c6 (diff) | |
download | chromium_src-4a9717e2030aadf15cb62275ed0f4ff1a37e869f.zip chromium_src-4a9717e2030aadf15cb62275ed0f4ff1a37e869f.tar.gz chromium_src-4a9717e2030aadf15cb62275ed0f4ff1a37e869f.tar.bz2 |
Add --gtest_filter option to valgrind_test.py
Also exit with nonzero status if valgrind errors are found in log -- else tree is falsely shown as green.
Review URL: http://codereview.chromium.org/48085
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11908 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/valgrind/valgrind_test.py')
-rwxr-xr-x | tools/valgrind/valgrind_test.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tools/valgrind/valgrind_test.py b/tools/valgrind/valgrind_test.py index bce0542..6fc7da5 100755 --- a/tools/valgrind/valgrind_test.py +++ b/tools/valgrind/valgrind_test.py @@ -52,6 +52,8 @@ class Valgrind(object): self._parser.add_option("", "--suppressions", default=["."], action="append", help="path to a valgrind suppression file") + self._parser.add_option("", "--gtest_filter", default="", + help="which test case to run") self._parser.add_option("", "--generate_suppressions", action="store_true", default=False, help="Skip analysis and generate suppressions") @@ -64,6 +66,8 @@ class Valgrind(object): self._suppressions = self._options.suppressions self._generate_suppressions = self._options.generate_suppressions self._source_dir = self._options.source_dir + if self._options.gtest_filter != "": + self._args.append("--gtest_filter=%s" % self._options.gtest_filter) return True def Setup(self): @@ -91,9 +95,7 @@ class Valgrind(object): # 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.Report() - # Return success... should we return failure if there are errors? - return 0 + return analyzer.Report() def Cleanup(self): # Right now, we can cleanup by deleting our temporary directory. Other |