Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
bpo-31160: regrtest now reaps child processes (#3044)
Add a post_test_cleanup() function which currently only calls
support.reap_children().
(cherry picked from commit e3510d7)
  • Loading branch information
vstinner committed Aug 10, 2017
commit 7cd517e34d49123e9c610593f4d79b8df23a542f
4 changes: 4 additions & 0 deletions Lib/test/regrtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -1172,6 +1172,9 @@ def __exit__(self, exc_type, exc_val, exc_tb):
return False


def post_test_cleanup():
test_support.reap_children()

def runtest_inner(test, verbose, quiet, huntrleaks=False, pgo=False, testdir=None):
test_support.unload(test)
if verbose:
Expand Down Expand Up @@ -1205,6 +1208,7 @@ def runtest_inner(test, verbose, quiet, huntrleaks=False, pgo=False, testdir=Non
refleak = dash_R(the_module, test, indirect_test,
huntrleaks)
test_time = time.time() - start_time
post_test_cleanup()
finally:
sys.stdout = save_stdout
except test_support.ResourceDenied, msg:
Expand Down