diff options
author | Victor Stinner <vstinner@python.org> | 2023-09-30 20:48:26 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-30 20:48:26 (GMT) |
commit | 2c234196ea30b9da370780204ed9068f1fb134c6 (patch) | |
tree | 18f3e79aafba9bbadfb27f26904e52a8e08341a3 /Lib/test/libregrtest/result.py | |
parent | c62b49ecc8da13fa9522865ef6fe0aec194fd0d8 (diff) | |
download | cpython-2c234196ea30b9da370780204ed9068f1fb134c6.zip cpython-2c234196ea30b9da370780204ed9068f1fb134c6.tar.gz cpython-2c234196ea30b9da370780204ed9068f1fb134c6.tar.bz2 |
gh-109276: regrtest: add WORKER_FAILED state (#110148)
Rename WORKER_ERROR to WORKER_BUG. Add WORKER_FAILED state: it does
not stop the manager, whereas WORKER_BUG does.
Change also TestResults.display_result() order: display failed tests
at the end, the important important information.
WorkerThread now tries to get the signal name for negative exit code.
Diffstat (limited to 'Lib/test/libregrtest/result.py')
-rw-r--r-- | Lib/test/libregrtest/result.py | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/Lib/test/libregrtest/result.py b/Lib/test/libregrtest/result.py index bf88526..d6b0d5a 100644 --- a/Lib/test/libregrtest/result.py +++ b/Lib/test/libregrtest/result.py @@ -19,7 +19,8 @@ class State: ENV_CHANGED = "ENV_CHANGED" RESOURCE_DENIED = "RESOURCE_DENIED" INTERRUPTED = "INTERRUPTED" - MULTIPROCESSING_ERROR = "MULTIPROCESSING_ERROR" + WORKER_FAILED = "WORKER_FAILED" # non-zero worker process exit code + WORKER_BUG = "WORKER_BUG" # exception when running a worker DID_NOT_RUN = "DID_NOT_RUN" TIMEOUT = "TIMEOUT" @@ -29,7 +30,8 @@ class State: State.FAILED, State.UNCAUGHT_EXC, State.REFLEAK, - State.MULTIPROCESSING_ERROR, + State.WORKER_FAILED, + State.WORKER_BUG, State.TIMEOUT} @staticmethod @@ -42,14 +44,16 @@ class State: State.SKIPPED, State.RESOURCE_DENIED, State.INTERRUPTED, - State.MULTIPROCESSING_ERROR, + State.WORKER_FAILED, + State.WORKER_BUG, State.DID_NOT_RUN} @staticmethod def must_stop(state): return state in { State.INTERRUPTED, - State.MULTIPROCESSING_ERROR} + State.WORKER_BUG, + } @dataclasses.dataclass(slots=True) @@ -108,8 +112,10 @@ class TestResult: return f"{self.test_name} skipped (resource denied)" case State.INTERRUPTED: return f"{self.test_name} interrupted" - case State.MULTIPROCESSING_ERROR: - return f"{self.test_name} process crashed" + case State.WORKER_FAILED: + return f"{self.test_name} worker non-zero exit code" + case State.WORKER_BUG: + return f"{self.test_name} worker bug" case State.DID_NOT_RUN: return f"{self.test_name} ran no tests" case State.TIMEOUT: |