Skip to content

Rework run_in_subprocess to also take care of error handling

Adam Coldrick requested to merge sotk/tech-debt/fix-subprocess-tests into master

Description

This MR centralizes the error handling for test code that needs to be run in a subprocess, and fixes it to catch all exceptions rather than only AssertionErrors. Currently, unhandled exceptions cause the test suite to hang with no useful information, which is very unhelpful.

This MR also improves the amount of information provided when these tests fail, by propagating the actual exception out of the subprocess and logging the original traceback to stderr.

Issues addressed

Closes #279 (closed)

Merge request reports

Loading