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

Unified Diff: generate_test_report.py

Issue 4007008: Robustify printing of test errors to stderr. (Closed) Base URL: http://git.chromium.org/git/crosutils.git
Patch Set: Created 10 years, 2 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: generate_test_report.py
diff --git a/generate_test_report.py b/generate_test_report.py
index 8ff12df24e933bce7e09c4341df153ea16d871bb..97c3ec6f0da48e921caaa4eb2c11774ed3d84573 100755
--- a/generate_test_report.py
+++ b/generate_test_report.py
@@ -216,11 +216,16 @@ class ReportGenerator(object):
for path in glob.glob(debug_file_regex):
try:
fh = open(path)
- print ('\n========== DEBUG FILE %s FOR TEST %s ==============\n' % (
- path, test))
- print fh.read()
- print('\n=========== END DEBUG %s FOR TEST %s ===============\n' % (
- path, test))
+ print >> sys.stderr, (
+ '\n========== DEBUG FILE %s FOR TEST %s ==============\n' % (
+ path, test))
+ out = fh.read()
+ while out:
+ print >> sys.stderr, out
+ out = fh.read()
+ print >> sys.stderr, (
+ '\n=========== END DEBUG %s FOR TEST %s ===============\n' % (
+ path, test))
fh.close()
except:
print 'Could not open %s' % path
« 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