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,11 +216,16 @@ class ReportGenerator(object):
|
|||||||
for path in glob.glob(debug_file_regex):
|
for path in glob.glob(debug_file_regex):
|
||||||
try:
|
try:
|
||||||
fh = open(path)
|
fh = open(path)
|
||||||
print ('\n========== DEBUG FILE %s FOR TEST %s ==============\n' % (
|
print >> sys.stderr, (
|
||||||
path, test))
|
'\n========== DEBUG FILE %s FOR TEST %s ==============\n' % (
|
||||||
print fh.read()
|
path, test))
|
||||||
print('\n=========== END DEBUG %s FOR TEST %s ===============\n' % (
|
out = fh.read()
|
||||||
path, test))
|
while out:
|
||||||
|
print >> sys.stderr, out
|
||||||
|
out = fh.read()
|
||||||
|
print >> sys.stderr, (
|
||||||
|
'\n=========== END DEBUG %s FOR TEST %s ===============\n' % (
|
||||||
|
path, test))
|
||||||
fh.close()
|
fh.close()
|
||||||
except:
|
except:
|
||||||
print 'Could not open %s' % path
|
print 'Could not open %s' % path
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user