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

Unified Diff: tools/valgrind/valgrind_analyze.py

Issue 55034: Support valgrinding layout tests. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 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
Index: tools/valgrind/valgrind_analyze.py
===================================================================
--- tools/valgrind/valgrind_analyze.py (revision 12713)
+++ tools/valgrind/valgrind_analyze.py (working copy)
@@ -11,6 +11,7 @@
import optparse
import os
import sys
+import time
from xml.dom.minidom import parse
# These are functions (using C++ mangled names) that we look for in stack
@@ -189,10 +190,22 @@
self._errors = set()
for file in files:
+ # Wait up to a minute for valgrind to finish writing.
+ f = open(file, "r")
+ ntries = 60
+ for tries in range(0, ntries):
+ f.seek(0)
+ if sum((1 for line in f if '</valgrindoutput>' in line)) > 0:
+ break
+ time.sleep(1)
+ f.close()
+ if tries == ntries-1:
Erik does not do reviews 2009/03/30 16:22:48 space around operator
+ logging.error("valgrind never finished?")
raw_errors = parse(file).getElementsByTagName("error")
for raw_error in raw_errors:
# Ignore "possible" leaks for now by default.
- if (show_all_leaks or getTextOf(raw_error, "kind") != "Leak_PossiblyLost"):
+ if (show_all_leaks or
+ getTextOf(raw_error, "kind") != "Leak_PossiblyLost"):
self._errors.add(ValgrindError(source_dir, raw_error))
def Report(self):

Powered by Google App Engine
This is Rietveld 408576698