summaryrefslogtreecommitdiffstats
path: root/tools/valgrind/drmemory_analyze.py
diff options
context:
space:
mode:
authortimurrrr@chromium.org <timurrrr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-06 15:21:16 +0000
committertimurrrr@chromium.org <timurrrr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-06 15:21:16 +0000
commit5f67c2aa8ac51fe58c7ebd7766852c858e81a0b5 (patch)
tree251a702bb73d6d5a707fbd08433b6e4260d20efe /tools/valgrind/drmemory_analyze.py
parent2f733a021dea2d4c157719e67c47f5132b4de19c (diff)
downloadchromium_src-5f67c2aa8ac51fe58c7ebd7766852c858e81a0b5.zip
chromium_src-5f67c2aa8ac51fe58c7ebd7766852c858e81a0b5.tar.gz
chromium_src-5f67c2aa8ac51fe58c7ebd7766852c858e81a0b5.tar.bz2
Print out the list of used Dr. Memory suppressions at the end of the run.
TBR=bruening Review URL: http://codereview.chromium.org/8173003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104301 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/valgrind/drmemory_analyze.py')
-rwxr-xr-xtools/valgrind/drmemory_analyze.py31
1 files changed, 26 insertions, 5 deletions
diff --git a/tools/valgrind/drmemory_analyze.py b/tools/valgrind/drmemory_analyze.py
index 34df08b..3a819fa 100755
--- a/tools/valgrind/drmemory_analyze.py
+++ b/tools/valgrind/drmemory_analyze.py
@@ -36,7 +36,7 @@ class DrMemoryAnalyze:
'''
self.reports = []
- self.used_suppressions = {}
+ self.used_suppressions = []
for file in files:
self.ParseReportFile(file)
@@ -57,10 +57,9 @@ class DrMemoryAnalyze:
while True:
self.ReadLine()
- if (self.line_ == ''):
- break
- if re.search("FINAL SUMMARY", self.line_):
- # DrMemory has finished working.
+ if (self.line_ == ''): break
+ if re.search("FINAL SUMMARY:", self.line_):
+ # No more reports since this point.
break
tmp = []
match = re.search("^Error #[0-9]+: (.*)", self.line_)
@@ -71,12 +70,34 @@ class DrMemoryAnalyze:
elif self.line_.startswith("ASSERT FAILURE"):
self.reports.append(self.line_.strip())
+ while True:
+ self.ReadLine();
+ if (self.line_ == ''): break
+
+ if re.search("SUPPRESSIONS USED:", self.line_):
+ self.ReadLine()
+ while self.line_.strip() != "":
+ # TODO(timurrrr): use Valgrind format so the suppression dashboard
+ # counts used DrM suppressions too.
+ self.used_suppressions.append(self.line_.strip())
+ self.ReadLine()
+ break
+
self.cur_fd_.close()
def Report(self, check_sanity):
sys.stdout.flush()
#TODO(timurrrr): support positive tests / check_sanity==True
+ if self.used_suppressions:
+ print "-----------------------------------------------------"
+ # TODO(timurrrr): sum up the counts from different wrappers (e.g. ui_tests)
+ # or does it work now already? Or add the memcheck-like per-test printing.
+ print "Suppressions used:\n count name\n ", # , adds ' ' instead of '\n'
+ print "\n ".join(self.used_suppressions)
+ print "-----------------------------------------------------"
+ sys.stdout.flush()
+
if len(self.reports) > 0:
logging.error("Found %i error reports" % len(self.reports))
for report_list in self.reports: