summaryrefslogtreecommitdiff
path: root/Lib/test/test_regrtest.py
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2019-04-26 08:40:25 +0200
committerGitHub <noreply@github.com>2019-04-26 08:40:25 +0200
commit3cde440f20a9db75fb2c4e65e8e4d04a53216a2d (patch)
treec867159d768e27d5c92bd7dc4bef8d749255baa6 /Lib/test/test_regrtest.py
parent87d23a041d9efb743c5680ac23305ddddf300e51 (diff)
downloadcpython-git-3cde440f20a9db75fb2c4e65e8e4d04a53216a2d.tar.gz
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.
Diffstat (limited to 'Lib/test/test_regrtest.py')
-rw-r--r--Lib/test/test_regrtest.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_regrtest.py b/Lib/test/test_regrtest.py
index 5c65e6dd85..e0d1d3cec7 100644
--- a/Lib/test/test_regrtest.py
+++ b/Lib/test/test_regrtest.py
@@ -916,13 +916,13 @@ class ArgsTestCase(BaseTestCase):
testname)
self.assertEqual(output.splitlines(), all_methods)
+ @support.cpython_only
def test_crashed(self):
# Any code which causes a crash
code = 'import faulthandler; faulthandler._sigsegv()'
crash_test = self.create_test(name="crash", code=code)
- ok_test = self.create_test(name="ok")
- tests = [crash_test, ok_test]
+ tests = [crash_test]
output = self.run_tests("-j2", *tests, exitcode=2)
self.check_executed_tests(output, tests, failed=crash_test,
randomize=True)