bpo-31692, bpo-19527:
* Add a new PYTHONSHOWALLOCCOUNT environment variable, similar to
the Python 3 "-X showalloccount" option
* When Python is compiled with COUNT_ALLOCS, the new
PYTHONSHOWALLOCCOUNT environment variable now has to be set to dump
allocation counts into stderr on shutdown. Moreover, allocations
statistics are now dumped into stderr rather than stdout.
* Add @test.support.requires_type_collecting decorator: skip test if
COUNT_ALLOCS is defined
* Fix tests for COUNT_ALLOCS: decorate some methods with
@requires_type_collecting
* test_sys.test_objecttypes(): update object type when COUNT_ALLOCS
is defined
Add a new _testcapi._read_null() function to crash Python in a
reliable way on s390x.
On s390x, ctypes.string_at(0) returns an empty string rather than
crashing.
* bpo-30523: regrtest --list-cases --match (#2401)
* regrtest --list-cases now supports --match and --match-file options.
Example: ./python -m test --list-cases -m FileTests test_os
* --list-cases now also sets support.verbose to False to prevent
messages to stdout when loading test modules.
* Add support._match_test() private function.
(cherry picked from commit ace56d5836)
(cherry picked from commit 36946c06a3)
* bpo-30764: regrtest: add --fail-env-changed option (#2402)
* bpo-30764: regrtest: change exit code on failure
* Exit code 2 if failed tests ("bad")
* Exit code 3 if interrupted
* bpo-30764: regrtest: add --fail-env-changed option
If the option is set, mark a test as failed if it alters the
environment, for example if it creates a file without removing it.
(cherry picked from commit 63f54c6893)
(cherry picked from commit 1f33857a36)
* bpo-30776: reduce regrtest -R false positives (#2422)
* Change the regrtest --huntrleaks checker to decide if a test file
leaks or not. Require that each run leaks at least 1 reference.
* Warmup runs are now completely ignored: ignored in the checker test
and not used anymore to compute the sum.
* Add an unit test for a reference leak.
Example of reference differences previously considered a failure
(leak) and now considered as success (success, no leak):
[3, 0, 0]
[0, 1, 0]
[8, -8, 1]
(cherry picked from commit 48b5c422ff)
(cherry picked from commit e0f8b43a46)
* Add test.support._crash_python() which triggers a crash but uses
test.support.SuppressCrashReport() to prevent a crash report from
popping up.
* Modify test_child_terminated_in_stopped_state() of test_subprocess
and test_crashed() of test_regrtest to use _crash_python().
* bpo-30283: regrtest: backport test_coverage()
* Add --coverage option, the option was already described in the doc
* When coverage is used, regrtest now pass all options to runtest()
and calls also accumulate_result() (as done when coverage is not
used).
* bpo-25260: Fix coverage on Windows: remove the list of ignored
directories.
* bpo-30283: regrtest: backport test_slow_interrupted()
* Fix regrtest to report interrupted tests as omitted rather than
failed.
* bpo-25260: Fix coverage on Windows: remove the list of ignored
directories.
* bpo-30283: Fix test_regrtest on Visual Studio 2008
Skip Tools\buildbot\test.bat and PCbuild\rt.bat if Python was not
compiled in PCbuild (but compiled in PC\VS9.0\ for example).
* regrtest: add --slowest alias to --slow
* make buildbottest: add --slowest option
* regrtest: add "- " prefix to --slowest output
* regrtest: Fix an outdated comment
* regrtest: replace PermissionError
Replace PermissionError with OSError and check on exc.errno.
PermissionError was added to Python 3.3.
* regrtest: add -3 -tt options to run Python scripts
* regrtest: backport --list-tests option
* regrtest: backport "Tests result: xxx" summary
* regrtest: backport total duration
* regrtest: add timestamp to the progress
* regrtest: describe previous test state
* Add the state of the test: passed, failed, etc.
* If a test took longer than 30 seconds, log its execution time
* regrtest: -jN logs running workers
* regrtest: mention if tests are run in parallel
* regrtest: parallel mode is more verbose during wait
Display running tests every 30 seconds if no test completed in the
meanwhile.
* test_regrtest: fix typo in SubprocessRun
* bpo-30283: regrtest: add --testdir option
* bpo-30283: Backport _testcapi.raise_signal()
Function used by test_regrtest to simulate an interrupted unit test.
* bpo-30283: Backport test_regrtest from master