Report python test worker failures separately from test failures

This commit is contained in:
Kovid Goyal 2026-08-12 15:29:40 +05:30
parent 485a12aa12
commit f047fc82d5
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C

View file

@ -316,7 +316,7 @@ def run_test_worker(tests: list[unittest.TestCase], write_fd: int) -> None:
with forwardable_stdio():
result = PipeTestResult(write_fd)
unittest.TestSuite(tests).run(result)
exit_code = 0 if not result.failures and not result.errors else 1
exit_code = 0
except Exception:
import traceback
@ -534,7 +534,9 @@ def collect_worker_results(
py_worker_errors.append(rec['msg'])
for pid in pids:
os.waitpid(pid, 0)
_, status = os.waitpid(pid, 0)
if status != 0:
py_worker_errors.append(f'Python test worker {pid} exited with status {os.waitstatus_to_exitcode(status)}')
elapsed = time.monotonic() - start