mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
bpo-36725: Refactor regrtest multiprocessing code (GH-12961)
Rewrite run_tests_multiprocess() function as a new MultiprocessRunner class with multiple methods to better report errors and stop immediately when needed. Changes: * Worker processes are now killed immediately if tests are interrupted or if a test does crash (CHILD_ERROR): worker processes are killed. * Rewrite how errors in a worker thread are reported to the main thread. No longer ignore BaseException or parsing errors silently. * Remove 'finished' variable: use worker.is_alive() instead * Always compute omitted tests. Add Regrtest.get_executed() method.
This commit is contained in:
parent
87d23a041d
commit
3cde440f20
5 changed files with 207 additions and 154 deletions
|
@ -275,6 +275,7 @@ def _runtest_inner(ns, test_name, display_failure=True):
|
|||
except support.TestDidNotRun:
|
||||
return TEST_DID_NOT_RUN
|
||||
except KeyboardInterrupt:
|
||||
print()
|
||||
return INTERRUPTED
|
||||
except:
|
||||
if not ns.pgo:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue