mirror of
https://github.com/python/cpython.git
synced 2025-11-02 11:08:57 +00:00
Don't strip refcount in libregrtest/runtest_mp.py
Python doesn't display the refcount anymore by default. It only displays it when -X showrefcount command line option is used, which is not the case here. regrtest can be run with -X showrefcount, the option is not inherited by child processes.
This commit is contained in:
parent
86e8c31b8d
commit
02319804ea
1 changed files with 0 additions and 6 deletions
|
|
@ -15,9 +15,6 @@ except ImportError:
|
||||||
from test.libregrtest.runtest import runtest, INTERRUPTED, CHILD_ERROR
|
from test.libregrtest.runtest import runtest, INTERRUPTED, CHILD_ERROR
|
||||||
|
|
||||||
|
|
||||||
debug_output_pat = re.compile(r"\[\d+ refs, \d+ blocks\]$")
|
|
||||||
|
|
||||||
|
|
||||||
def run_tests_in_subprocess(testname, ns):
|
def run_tests_in_subprocess(testname, ns):
|
||||||
"""Run the given test in a subprocess with --slaveargs.
|
"""Run the given test in a subprocess with --slaveargs.
|
||||||
|
|
||||||
|
|
@ -105,9 +102,6 @@ class MultiprocessThread(threading.Thread):
|
||||||
return
|
return
|
||||||
retcode, stdout, stderr = run_tests_in_subprocess(test,
|
retcode, stdout, stderr = run_tests_in_subprocess(test,
|
||||||
self.ns)
|
self.ns)
|
||||||
# Strip last refcount output line if it exists, since it
|
|
||||||
# comes from the shutdown of the interpreter in the subcommand.
|
|
||||||
stderr = debug_output_pat.sub("", stderr)
|
|
||||||
stdout, _, result = stdout.strip().rpartition("\n")
|
stdout, _, result = stdout.strip().rpartition("\n")
|
||||||
if retcode != 0:
|
if retcode != 0:
|
||||||
result = (CHILD_ERROR, "Exit code %s" % retcode)
|
result = (CHILD_ERROR, "Exit code %s" % retcode)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue