mirror of
https://github.com/flatcar/scripts.git
synced 2025-11-14 15:12:03 +01:00
Robustify printing of test errors to stderr.
Change-Id: I1e5da670437ce6574910a34d09b30aa80aee6f4f BUG=8056 TEST=Ran it with tests that both succeeded and failed. Review URL: http://codereview.chromium.org/4007008
This commit is contained in:
parent
9fe00b9b13
commit
5e0909abad
@ -216,10 +216,15 @@ class ReportGenerator(object):
|
||||
for path in glob.glob(debug_file_regex):
|
||||
try:
|
||||
fh = open(path)
|
||||
print ('\n========== DEBUG FILE %s FOR TEST %s ==============\n' % (
|
||||
print >> sys.stderr, (
|
||||
'\n========== DEBUG FILE %s FOR TEST %s ==============\n' % (
|
||||
path, test))
|
||||
print fh.read()
|
||||
print('\n=========== END DEBUG %s FOR TEST %s ===============\n' % (
|
||||
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:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user