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   ...
```

PR-URL: #19855
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Gibson Fahnestock <[email protected]>
Reviewed-By: Rod Vagg <[email protected]>
  • Loading branch information
Trott authored and jasnell committed Apr 16, 2018
1 parent 0a553d5 commit 114ba67
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 114ba67

Please sign in to comment.