mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
[3.13] gh-119050: Add XML support to libregrtest refleak checker (GH-119148) (#119270)
gh-119050: Add XML support to libregrtest refleak checker (GH-119148)
regrtest test runner: Add XML support to the refleak checker
(-R option).
* run_unittest() now stores XML elements as string, rather than
objects, in support.junit_xml_list.
* runtest_refleak() now saves/restores XML strings before/after
checking for reference leaks. Save XML into a temporary file.
(cherry picked from commit 9257731f5d
)
Co-authored-by: Victor Stinner <vstinner@python.org>
This commit is contained in:
parent
071d996e13
commit
42a8d11752
5 changed files with 39 additions and 25 deletions
|
@ -520,15 +520,6 @@ def _parse_args(args, **kwargs):
|
|||
"--huntrleaks without -jN option",
|
||||
file=sys.stderr)
|
||||
|
||||
if ns.huntrleaks and ns.xmlpath:
|
||||
# The XML data is written into a file outside runtest_refleak(), so
|
||||
# it looks like a leak but it's not. Simply disable XML output when
|
||||
# hunting for reference leaks (gh-83434).
|
||||
ns.xmlpath = None
|
||||
print("WARNING: Disable --junit-xml because it's incompatible "
|
||||
"with --huntrleaks",
|
||||
file=sys.stderr)
|
||||
|
||||
if ns.forever:
|
||||
# --forever implies --failfast
|
||||
ns.failfast = True
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue