Skip to content

Commit f69e124

Browse files
adamnovakmr-c
authored andcommitted
Collect output from timed-out tests
This should fix #121
1 parent e27d9be commit f69e124

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cwltest/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,10 @@ def run_test(
204204
" ".join([quote(tc) for tc in test_command]),
205205
)
206206
_logger.error(test.get("doc"))
207+
# Kill and re-communicate to get the logs and reap the child, as
208+
# instructed in the subprocess docs.
209+
process.kill()
210+
outstr, outerr = process.communicate()
207211
return TestResult(2, outstr, outerr, timeout, args.classname, "Test timed out")
208212
finally:
209213
if process is not None and process.returncode is None:

0 commit comments

Comments
 (0)