Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(168)

Side by Side Diff: tools/valgrind/drmemory_analyze.py

Issue 8638010: Print out at-exit ASSERT FAILURES too (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2011 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 # drmemory_analyze.py 6 # drmemory_analyze.py
7 7
8 ''' Given a Dr. Memory output file, parses errors and uniques them.''' 8 ''' Given a Dr. Memory output file, parses errors and uniques them.'''
9 9
10 import logging 10 import logging
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 if re.search("SUPPRESSIONS USED:", self.line_): 77 if re.search("SUPPRESSIONS USED:", self.line_):
78 self.ReadLine() 78 self.ReadLine()
79 while self.line_.strip() != "": 79 while self.line_.strip() != "":
80 line = self.line_.strip() 80 line = self.line_.strip()
81 (count, name) = re.match(" *([0-9]+)x(?: \(leaked .*\))?: (.*)", 81 (count, name) = re.match(" *([0-9]+)x(?: \(leaked .*\))?: (.*)",
82 line).groups() 82 line).groups()
83 self.used_suppressions.append("%7s %s" % (count, name)) 83 self.used_suppressions.append("%7s %s" % (count, name))
84 self.ReadLine() 84 self.ReadLine()
85 break 85 break
86 86
87 while True:
88 self.ReadLine();
89 if (self.line_ == ''): break
90
91 if self.line_.startswith("ASSERT FAILURE"):
92 self.reports.append(self.line_.strip())
93
87 self.cur_fd_.close() 94 self.cur_fd_.close()
88 95
89 def Report(self, check_sanity): 96 def Report(self, check_sanity):
90 sys.stdout.flush() 97 sys.stdout.flush()
91 #TODO(timurrrr): support positive tests / check_sanity==True 98 #TODO(timurrrr): support positive tests / check_sanity==True
92 99
93 if self.used_suppressions: 100 if self.used_suppressions:
94 print "-----------------------------------------------------" 101 print "-----------------------------------------------------"
95 # TODO(timurrrr): sum up the counts from different wrappers (e.g. ui_tests ) 102 # TODO(timurrrr): sum up the counts from different wrappers (e.g. ui_tests )
96 # or does it work now already? Or add the memcheck-like per-test printing. 103 # or does it work now already? Or add the memcheck-like per-test printing.
(...skipping 24 matching lines...) Expand all
121 128
122 (options, args) = parser.parse_args() 129 (options, args) = parser.parse_args()
123 if len(args) == 0: 130 if len(args) == 0:
124 parser.error("no filename specified") 131 parser.error("no filename specified")
125 filenames = args 132 filenames = args
126 133
127 analyzer = DrMemoryAnalyze(options.source_dir, filenames) 134 analyzer = DrMemoryAnalyze(options.source_dir, filenames)
128 retcode = analyzer.Report(False) 135 retcode = analyzer.Report(False)
129 136
130 sys.exit(retcode) 137 sys.exit(retcode)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698