]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.12] gh-83434: Sync libregrtest and test_regrtest with the main branch (#117250)
authorVictor Stinner <vstinner@python.org>
Tue, 26 Mar 2024 08:04:28 +0000 (09:04 +0100)
committerGitHub <noreply@github.com>
Tue, 26 Mar 2024 08:04:28 +0000 (08:04 +0000)
commit477ef9015c312725734c4613b5ba12e80d920a22
tree5a3f9e1b8bc8578ec61bbf8adeb02a2d36edaf31
parent1c72265a31eaf8724a5dd16391b951366460b64e
[3.12] gh-83434: Sync libregrtest and test_regrtest with the main branch (#117250)

* gh-115122: Add --bisect option to regrtest (#115123)

* test.bisect_cmd now exit with code 0 on success, and code 1 on
  failure. Before, it was the opposite.
* test.bisect_cmd now runs the test worker process with
  -X faulthandler.
* regrtest RunTests: Add create_python_cmd() and bisect_cmd()
  methods.

(cherry picked from commit 1e5719a663d5b1703ad588dda4fccd763c7d3e99)

* gh-115720: Show number of leaks in huntrleaks progress reports (GH-115726)

Instead of showing a dot for each iteration, show:
- '.' for zero (on negative) leaks
- number of leaks for 1-9
- 'X' if there are more leaks

This allows more rapid iteration: when bisecting, I don't need
to wait for the final report to see if the test still leaks.

Also, show the full result if there are any non-zero entries.
This shows negative entries, for the unfortunate cases where
a reference is created and cleaned up in different runs.

Test *failure* is still determined by the existing heuristic.

(cherry picked from commit af5f9d682c20c951b90e3c020eeccac386c9bbb0)

* gh-83434: Disable XML in regrtest when -R option is used (#117232)

(cherry picked from commit d52bdfb19fadd7614a0e5abaf68525fc7300e841)

---------

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Lib/test/bisect_cmd.py
Lib/test/libregrtest/cmdline.py
Lib/test/libregrtest/main.py
Lib/test/libregrtest/refleak.py
Lib/test/libregrtest/results.py
Lib/test/libregrtest/runtests.py
Lib/test/libregrtest/worker.py
Lib/test/test_regrtest.py
Misc/NEWS.d/next/Tests/2024-02-18-14-20-52.gh-issue-115122.3rGNo9.rst [new file with mode: 0644]
Misc/NEWS.d/next/Tests/2024-02-20-15-47-41.gh-issue-115720.w8i8UG.rst [new file with mode: 0644]
Misc/NEWS.d/next/Tests/2024-03-25-21-31-49.gh-issue-83434.U7Z8cY.rst [new file with mode: 0644]