summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authornirnimesh@chromium.org <nirnimesh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-25 14:12:41 +0000
committernirnimesh@chromium.org <nirnimesh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-25 14:12:41 +0000
commit4dbc9205913899723df7c3b6eb1c5ae8b9e5aa7e (patch)
tree969522ba97191f0454acdbbd0419a900a19a8dd6 /tools
parent46e8a5e00718d3df5b598bb6650d2474cdd6e660 (diff)
downloadchromium_src-4dbc9205913899723df7c3b6eb1c5ae8b9e5aa7e.zip
chromium_src-4dbc9205913899723df7c3b6eb1c5ae8b9e5aa7e.tar.gz
chromium_src-4dbc9205913899723df7c3b6eb1c5ae8b9e5aa7e.tar.bz2
Enable suppressions in Valgrind
Review URL: http://codereview.chromium.org/42601 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12447 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools')
-rwxr-xr-xtools/valgrind/valgrind_test.py29
1 files changed, 25 insertions, 4 deletions
diff --git a/tools/valgrind/valgrind_test.py b/tools/valgrind/valgrind_test.py
index 0910e0c..a108853 100755
--- a/tools/valgrind/valgrind_test.py
+++ b/tools/valgrind/valgrind_test.py
@@ -36,7 +36,6 @@ class Valgrind(object):
TMP_DIR = "valgrind.tmp"
def __init__(self):
- self._suppressions_files = []
# If we have a valgrind.tmp directory, we failed to cleanup last time.
if os.path.exists(self.TMP_DIR):
shutil.rmtree(self.TMP_DIR)
@@ -209,15 +208,37 @@ class ValgrindMac(Valgrind):
def ValgrindCommand(self):
"""Get the valgrind command to run."""
- proc = ["valgrind", "--leak-check=full"]
+ 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.
+ # TODO(nirnimesh): Enable when Analyze() is implemented
+ #if self._generate_suppressions:
+ # proc += ["--gen-suppressions=all"]
+ #else:
+ # proc += ["--xml=yes"]
+
+ suppression_count = 0
+ for suppression_file in self._suppressions:
+ if os.path.exists(suppression_file):
+ suppression_count += 1
+ proc += ["--suppressions=%s" % suppression_file]
+
+ if not suppression_count:
+ logging.warning("WARNING: NOT USING SUPPRESSIONS!")
+
# TODO(nirnimesh): Enable --log-file when Analyze() is implemented
- #proc += ["--log-file=" + self.TMP_DIR + "/valgrind.%p"]
+ # proc += ["--log-file=" + self.TMP_DIR + "/valgrind.%p"]
+
proc += self._args
return proc
def Analyze(self):
# TODO(nirnimesh): Implement analysis later. Valgrind on Mac is new so
- # analysis might not be useful until we have stable output from valgring
+ # analysis might not be useful until we have stable output from valgrind
return 0