Skip to content

Commit

Permalink
tools: include exit code in test failures
Browse files Browse the repository at this point in the history
Include the exit code in test failures. This will give us more
information during the currently-puzzling failures that provide no
information in CI such as:

```
03:10:10 not ok 563 parallel/test-fs-truncate
03:10:10   ---
03:10:10   duration_ms: 1.119
03:10:10   severity: fail
03:10:10   stack: |-
03:10:10   ...
```
  • Loading branch information
Trott committed Apr 6, 2018
1 parent 53aaa55 commit bdcd041
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ def HasRun(self, output):
if output.UnexpectedOutput():
status_line = 'not ok %i %s' % (self._done, command)
self.severity = 'fail'
self.traceback = output.output.stdout + output.output.stderr
self.traceback = "exit code: " + output.output.exit_code + "\n" + output.output.stdout + output.output.stderr

if FLAKY in output.test.outcomes and self.flaky_tests_mode == DONTCARE:
status_line = status_line + ' # TODO : Fix flaky test'
Expand Down

0 comments on commit bdcd041

Please sign in to comment.