diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2017-08-09 15:44:33 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-09 15:44:33 (GMT) |
commit | e3510d74aacc477c30f42f2b941d69689bbc478e (patch) | |
tree | 36269f04028aac9b7e46425a37dfb3a2deba01da | |
parent | 4baca1b0f7325032598cd38e7ceffc79b616d255 (diff) | |
download | cpython-e3510d74aacc477c30f42f2b941d69689bbc478e.zip cpython-e3510d74aacc477c30f42f2b941d69689bbc478e.tar.gz cpython-e3510d74aacc477c30f42f2b941d69689bbc478e.tar.bz2 |
bpo-31160: regrtest now reaps child processes (#3044)
Add a post_test_cleanup() function which currently only calls
support.reap_children().
-rw-r--r-- | Lib/test/libregrtest/runtest.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/libregrtest/runtest.py b/Lib/test/libregrtest/runtest.py index 0210409..dbd4634 100644 --- a/Lib/test/libregrtest/runtest.py +++ b/Lib/test/libregrtest/runtest.py @@ -146,6 +146,10 @@ def runtest(ns, test): runtest.stringio = None +def post_test_cleanup(): + support.reap_children() + + def runtest_inner(ns, test, display_failure=True): support.unload(test) @@ -173,6 +177,7 @@ def runtest_inner(ns, test, display_failure=True): if ns.huntrleaks: refleak = dash_R(the_module, test, test_runner, ns.huntrleaks) test_time = time.time() - start_time + post_test_cleanup() except support.ResourceDenied as msg: if not ns.quiet and not ns.pgo: print(test, "skipped --", msg, flush=True) |