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

Unified Diff: tools/valgrind/valgrind_test.py

Issue 155130: Fix tools/valgrind/chrome_tests.sh to always use --log-file option... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/process_util_posix.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/valgrind/valgrind_test.py
===================================================================
--- tools/valgrind/valgrind_test.py (revision 20014)
+++ tools/valgrind/valgrind_test.py (working copy)
@@ -136,6 +136,19 @@
def Analyze(self):
# Glob all the files in the "valgrind.tmp" directory
filenames = glob.glob(self.TMP_DIR + "/valgrind.*")
+ # TODO(dkegel): use new xml suppressions feature when it lands
+ if self._generate_suppressions:
+ # Just concatenate all the output files. Lame...
+ for filename in filenames:
+ print "## %s" % filename
+ f = file(filename)
+ while True:
+ line = f.readline()
+ if len(line) == 0:
+ break
+ print line, # comma means don't add newline
+ f.close()
+ return 0
analyzer = valgrind_analyze.ValgrindAnalyze(self._source_dir, filenames, self._options.show_all_leaks)
return analyzer.Report()
@@ -148,9 +161,6 @@
def RunTestsAndAnalyze(self):
self.PrepareForTest()
self.Execute()
- if self._generate_suppressions:
- logging.info("Skipping analysis to let you look at the raw output...")
- return 0
retcode = self.Analyze()
if retcode:
@@ -224,11 +234,8 @@
if not suppression_count:
logging.warning("WARNING: NOT USING SUPPRESSIONS!")
- if not self._generate_suppressions:
- # We don't currently collect suppressions from individual log files,
- # so let it all go to stdout. This leads to occasional
- # corruption; see above TODO.
- proc += ["--log-file=" + self.TMP_DIR + "/valgrind.%p"]
+ proc += ["--log-file=" + self.TMP_DIR + "/valgrind.%p"]
+
# The Valgrind command is constructed.
if self._options.indirect:
« no previous file with comments | « base/process_util_posix.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698