From 114ba67b02ffd34b8d1b74dd44da21e05d0de483 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Fri, 6 Apr 2018 10:41:29 -0700 Subject: [PATCH] tools: include exit code in test failures 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: https://github.com/nodejs/node/pull/19855 Reviewed-By: Sakthipriyan Vairamani Reviewed-By: Ben Noordhuis Reviewed-By: Gibson Fahnestock Reviewed-By: Rod Vagg --- tools/test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/test.py b/tools/test.py index 230774b25619da..3b63780170f900 100755 --- a/tools/test.py +++ b/tools/test.py @@ -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'