mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
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.
This commit is contained in:
parent
c62b49ecc8
commit
2c234196ea
5 changed files with 83 additions and 28 deletions
|
@ -14,6 +14,7 @@ import platform
|
|||
import random
|
||||
import re
|
||||
import shlex
|
||||
import signal
|
||||
import subprocess
|
||||
import sys
|
||||
import sysconfig
|
||||
|
@ -2066,6 +2067,15 @@ class TestUtils(unittest.TestCase):
|
|||
self.assertIsNone(normalize('setUpModule (test.test_x)', is_error=True))
|
||||
self.assertIsNone(normalize('tearDownModule (test.test_module)', is_error=True))
|
||||
|
||||
def test_get_signal_name(self):
|
||||
for exitcode, expected in (
|
||||
(-int(signal.SIGINT), 'SIGINT'),
|
||||
(-int(signal.SIGSEGV), 'SIGSEGV'),
|
||||
(3221225477, "STATUS_ACCESS_VIOLATION"),
|
||||
(0xC00000FD, "STATUS_STACK_OVERFLOW"),
|
||||
):
|
||||
self.assertEqual(utils.get_signal_name(exitcode), expected, exitcode)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue