Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
tools: show stdout/stderr for timed out tests
When a test times out, the contents of stdout and stderr can often be
highly valuable in debugging. Provide that information.

Refs: #19906 (comment)
  • Loading branch information
Trott committed Apr 24, 2018
commit f49964a858c1701e96750e726b25b1e42d55f586
2 changes: 1 addition & 1 deletion tools/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ def HasRun(self, output):
(total_seconds, duration.microseconds / 1000))
if self.severity is not 'ok' or self.traceback is not '':
if output.HasTimedOut():
self.traceback = 'timeout'
self.traceback = 'timeout\n' + output.output.stdout + output.output.stderr
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest to add a line break between stdout and stderr.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The way it's done here is the way it is done on line 291. Wanted to keep it consistent. Maybe a subsequent PR can change them both if there's agreement that a blank line would help.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After reviewing #20295, do we expect anything in stderr/stdout if output.UnexpectedOutput() on L287 is false? If not can we simplify to self.traceback += '\ntimeout' as self.traceback is set on L291 with the contents of stderr/stdout.

self._printDiagnostic()
logger.info(' ...')

Expand Down