bpo-36725: regrtest: add TestResult type#12960
Conversation
* Add TestResult and MultiprocessResult types to ensure that results always have the same fields. * runtest() now handles KeyboardInterrupt * accumulate_result() and format_test_result() now takes a TestResult * cleanup_test_droppings() is now called by runtest() and mark the test as ENV_CHANGED if the test leaks support.TESTFN file. * runtest() now includes code "around" the test in the test timing * Add print_warning() in test.libregrtest.utils to standardize how libregrtest logs warnings to ease parsing the test output. * support.unload() is now called with abstest rather than test_name * Rename 'test' variable/parameter to 'test_name' * dash_R(): remove unused the_module parameter * Remove unused imports
⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️Hi! The buildbot AMD64 Windows10 3.x has failed when building commit 4d29983. What do you need to do:
You can take a look at the buildbot page here: https://buildbot.python.org/all/#builders/3/builds/2469 Click to see traceback logsFrom https://github.com/python/cpython
* branch master -> FETCH_HEAD
Reset branch 'master'
Could Not Find D:\buildarea\3.x.bolen-windows10\build\Lib\*.pyc
The system cannot find the file specified.
Could Not Find D:\buildarea\3.x.bolen-windows10\build\PCbuild\python*.zip
test_dbm_ndbm skipped -- No module named '_dbm'
test_pipes skipped -- pipes module only works on posix
test_threadsignals skipped -- Can't test signal on win32
test_fork1 skipped -- object <module 'os' from 'D:\\buildarea\\3.x.bolen-windows10\\build\\lib\\os.py'> has no attribute 'fork'
minkernel\crts\ucrt\src\appcrt\lowio\write.cpp(49) : Assertion failed: (_osfile(fh) & FOPEN)
minkernel\crts\ucrt\src\appcrt\lowio\close.cpp(49) : Assertion failed: (_osfile(fh) & FOPEN)
minkernel\crts\ucrt\src\appcrt\lowio\close.cpp(49) : Assertion failed: (_osfile(fh) & FOPEN)
test_devpoll skipped -- test works only on Solaris OS family
test_kqueue skipped -- test works only on BSD
test_curses skipped -- No module named '_curses'
test_gdb skipped -- Couldn't find gdb on the path
minkernel\crts\ucrt\src\appcrt\lowio\write.cpp(49) : Assertion failed: (_osfile(fh) & FOPEN)
test_openpty skipped -- os.openpty() not available.
test_crypt skipped -- No module named '_crypt'
test_resource skipped -- No module named 'resource'
test_pty skipped -- No module named 'termios'
stty: standard input: Inappropriate ioctl for device
test_xxtestfuzz skipped -- No module named '_xxtestfuzz'
test_dbm_gnu skipped -- No module named '_gdbm'
test_spwd skipped -- No module named 'spwd'
test_wait3 skipped -- os.fork not defined
test_ossaudiodev skipped -- No module named 'ossaudiodev'
test_nis skipped -- No module named 'nis'
test_syslog skipped -- No module named 'syslog'
test_multiprocessing_forkserver skipped -- forkserver is not available on Windows
test_multiprocessing_fork skipped -- fork is not available on Windows
test_fcntl skipped -- No module named 'fcntl'
test_grp skipped -- No module named 'grp'
test_epoll skipped -- test works only on Linux 2.6
test_wait4 skipped -- object <module 'os' from 'D:\\buildarea\\3.x.bolen-windows10\\build\\lib\\os.py'> has no attribute 'fork'
test_readline skipped -- No module named 'readline'
test_abort (test.test_threading.BarrierTests) ... ok
test_abort_and_reset (test.test_threading.BarrierTests) ... ok
test_action (test.test_threading.BarrierTests) ... ok
test_barrier (test.test_threading.BarrierTests) ... ok
test_barrier_10 (test.test_threading.BarrierTests) ... ok
test_default_timeout (test.test_threading.BarrierTests) ... Unhandled exception in thread started by <function Bunch.__init__.<locals>.task at 0x0000023643636B98>
Traceback (most recent call last):
File "D:\buildarea\3.x.bolen-windows10\build\lib\test\lock_tests.py", line 41, in task
Unhandled exception in thread started by <function Bunch.__init__.<locals>.task at 0x0000023643636B98>
Traceback (most recent call last):
File "D:\buildarea\3.x.bolen-windows10\build\lib\test\lock_tests.py", line 41, in task
Unhandled exception in thread started by <function Bunch.__init__.<locals>.task at 0x0000023643636B98>
Traceback (most recent call last):
File "D:\buildarea\3.x.bolen-windows10\build\lib\test\lock_tests.py", line 41, in task
f()
File "D:\buildarea\3.x.bolen-windows10\build\lib\test\lock_tests.py", line 939, in f
f()
File "D:\buildarea\3.x.bolen-windows10\build\lib\test\lock_tests.py", line 939, in f
f()
File "D:\buildarea\3.x.bolen-windows10\build\lib\test\lock_tests.py", line 939, in f
i = barrier.wait()
File "D:\buildarea\3.x.bolen-windows10\build\lib\threading.py", line 613, in wait
i = barrier.wait()
File "D:\buildarea\3.x.bolen-windows10\build\lib\threading.py", line 613, in wait
i = barrier.wait()
File "D:\buildarea\3.x.bolen-windows10\build\lib\threading.py", line 613, in wait
self._wait(timeout)
File "D:\buildarea\3.x.bolen-windows10\build\lib\threading.py", line 653, in _wait
self._wait(timeout)
File "D:\buildarea\3.x.bolen-windows10\build\lib\threading.py", line 653, in _wait
Unhandled exception in thread started by <function Bunch.__init__.<locals>.task at 0x0000023643636B98>
Traceback (most recent call last):
File "D:\buildarea\3.x.bolen-windows10\build\lib\test\lock_tests.py", line 41, in task
f()
File "D:\buildarea\3.x.bolen-windows10\build\lib\test\lock_tests.py", line 939, in f
i = barrier.wait()
File "D:\buildarea\3.x.bolen-windows10\build\lib\threading.py", line 604, in wait
self._enter() # Block while the barrier drains.
File "D:\buildarea\3.x.bolen-windows10\build\lib\threading.py", line 628, in _enter
raise BrokenBarrierError
threading.BrokenBarrierError
raise BrokenBarrierError
threading.BrokenBarrierError
ERROR
test_reset (test.test_threading.BarrierTests) ... self._wait(timeout)
File "D:\buildarea\3.x.bolen-windows10\build\lib\threading.py", line 653, in _wait
raise BrokenBarrierError
threading.BrokenBarrierError
raise BrokenBarrierError
threading.BrokenBarrierError
ok
test_single_thread (test.test_threading.BarrierTests) ... ok
test_timeout (test.test_threading.BarrierTests) ... ok
test_wait_return (test.test_threading.BarrierTests) ... ok
test_acquire (test.test_threading.BoundedSemaphoreTests) ... ok
test_acquire_contended (test.test_threading.BoundedSemaphoreTests) ... ok
test_acquire_destroy (test.test_threading.BoundedSemaphoreTests) ... ok
test_acquire_timeout (test.test_threading.BoundedSemaphoreTests) ... ok
test_constructor (test.test_threading.BoundedSemaphoreTests) ... ok
test_default_value (test.test_threading.BoundedSemaphoreTests) ... ok
test_release_unacquired (test.test_threading.BoundedSemaphoreTests) ... ok
test_try_acquire (test.test_threading.BoundedSemaphoreTests) ... ok
test_try_acquire_contended (test.test_threading.BoundedSemaphoreTests) ... ok
test_with (test.test_threading.BoundedSemaphoreTests) ... ok
test__is_owned (test.test_threading.CRLockTests) ... ok
test_acquire_contended (test.test_threading.CRLockTests) ... ok
test_acquire_destroy (test.test_threading.CRLockTests) ... ok
test_acquire_release (test.test_threading.CRLockTests) ... ok
test_constructor (test.test_threading.CRLockTests) ... ok
test_different_thread (test.test_threading.CRLockTests) ... ok
test_locked_repr (test.test_threading.CRLockTests) ... ok
test_reacquire (test.test_threading.CRLockTests) ... ok
test_release_save_unacquired (test.test_threading.CRLockTests) ... ok
test_release_unacquired (test.test_threading.CRLockTests) ... ok
test_repr (test.test_threading.CRLockTests) ... ok
test_thread_leak (test.test_threading.CRLockTests) ... ok
test_timeout (test.test_threading.CRLockTests) ... ok
test_try_acquire (test.test_threading.CRLockTests) ... ok
test_try_acquire_contended (test.test_threading.CRLockTests) ... ok
test_weakref_deleted (test.test_threading.CRLockTests) ... ok
test_weakref_exists (test.test_threading.CRLockTests) ... ok
test_with (test.test_threading.CRLockTests) ... ok
test__is_owned (test.test_threading.ConditionAsRLockTests) ... ok
test_acquire_contended (test.test_threading.ConditionAsRLockTests) ... ok
test_acquire_destroy (test.test_threading.ConditionAsRLockTests) ... ok
test_acquire_release (test.test_threading.ConditionAsRLockTests) ... ok
test_constructor (test.test_threading.ConditionAsRLockTests) ... ok
test_different_thread (test.test_threading.ConditionAsRLockTests) ... ok
test_locked_repr (test.test_threading.ConditionAsRLockTests) ... ok
test_reacquire (test.test_threading.ConditionAsRLockTests) ... ok
test_release_save_unacquired (test.test_threading.ConditionAsRLockTests) ... ok
test_release_unacquired (test.test_threading.ConditionAsRLockTests) ... ok
test_repr (test.test_threading.ConditionAsRLockTests) ... ok
test_thread_leak (test.test_threading.ConditionAsRLockTests) ... ok
test_timeout (test.test_threading.ConditionAsRLockTests) ... ok
test_try_acquire (test.test_threading.ConditionAsRLockTests) ... ok
test_try_acquire_contended (test.test_threading.ConditionAsRLockTests) ... ok
test_weakref_deleted (test.test_threading.ConditionAsRLockTests) ... ok
test_weakref_exists (test.test_threading.ConditionAsRLockTests) ... ok
test_with (test.test_threading.ConditionAsRLockTests) ... ok
test_acquire (test.test_threading.ConditionTests) ... ok
test_notify (test.test_threading.ConditionTests) ... ok
test_timeout (test.test_threading.ConditionTests) ... ok
test_unacquired_notify (test.test_threading.ConditionTests) ... ok
test_unacquired_wait (test.test_threading.ConditionTests) ... ok
test_waitfor (test.test_threading.ConditionTests) ... ok
test_waitfor_timeout (test.test_threading.ConditionTests) ... ok
test_is_set (test.test_threading.EventTests) ... ok
test_notify (test.test_threading.EventTests) ... ok
test_reset_internal_locks (test.test_threading.EventTests) ... ok
test_set_and_clear (test.test_threading.EventTests) ... ok
test_timeout (test.test_threading.EventTests) ... ok
test_acquire_contended (test.test_threading.LockTests) ... ok
test_acquire_destroy (test.test_threading.LockTests) ... ok
test_acquire_release (test.test_threading.LockTests) ... ok
test_constructor (test.test_threading.LockTests) ... ok
test_different_thread (test.test_threading.LockTests) ... ok
test_locked_repr (test.test_threading.LockTests) ... ok
test_reacquire (test.test_threading.LockTests) ... ok
test_repr (test.test_threading.LockTests) ... ok
test_state_after_timeout (test.test_threading.LockTests) ... ok
test_thread_leak (test.test_threading.LockTests) ... ok
test_timeout (test.test_threading.LockTests) ... ok
test_try_acquire (test.test_threading.LockTests) ... ok
test_try_acquire_contended (test.test_threading.LockTests) ... ok
test_weakref_deleted (test.test_threading.LockTests) ... ok
test_weakref_exists (test.test_threading.LockTests) ... ok
test_with (test.test_threading.LockTests) ... ok
test__all__ (test.test_threading.MiscTestCase) ... ok
test__is_owned (test.test_threading.PyRLockTests) ... ok
test_acquire_contended (test.test_threading.PyRLockTests) ... ok
test_acquire_destroy (test.test_threading.PyRLockTests) ... ok
test_acquire_release (test.test_threading.PyRLockTests) ... ok
test_constructor (test.test_threading.PyRLockTests) ... ok
test_different_thread (test.test_threading.PyRLockTests) ... ok
test_locked_repr (test.test_threading.PyRLockTests) ... ok
test_reacquire (test.test_threading.PyRLockTests) ... ok
test_release_save_unacquired (test.test_threading.PyRLockTests) ... ok
test_release_unacquired (test.test_threading.PyRLockTests) ... ok
test_repr (test.test_threading.PyRLockTests) ... ok
test_thread_leak (test.test_threading.PyRLockTests) ... ok
test_timeout (test.test_threading.PyRLockTests) ... ok
test_try_acquire (test.test_threading.PyRLockTests) ... ok
test_try_acquire_contended (test.test_threading.PyRLockTests) ... ok
test_weakref_deleted (test.test_threading.PyRLockTests) ... ok
test_weakref_exists (test.test_threading.PyRLockTests) ... ok
test_with (test.test_threading.PyRLockTests) ... ok
test_acquire (test.test_threading.SemaphoreTests) ... ok
test_acquire_contended (test.test_threading.SemaphoreTests) ... ok
test_acquire_destroy (test.test_threading.SemaphoreTests) ... ok
test_acquire_timeout (test.test_threading.SemaphoreTests) ... ok
test_constructor (test.test_threading.SemaphoreTests) ... ok
test_default_value (test.test_threading.SemaphoreTests) ... ok
test_release_unacquired (test.test_threading.SemaphoreTests) ... ok
test_try_acquire (test.test_threading.SemaphoreTests) ... ok
test_try_acquire_contended (test.test_threading.SemaphoreTests) ... ok
test_with (test.test_threading.SemaphoreTests) ... ok
test_daemon_threads_fatal_error (test.test_threading.SubinterpThreadingTests) ... ok
test_threads_join (test.test_threading.SubinterpThreadingTests) ... ok
test_threads_join_2 (test.test_threading.SubinterpThreadingTests) ... ok
test_1_join_on_shutdown (test.test_threading.ThreadJoinOnShutdown) ... ok
test_2_join_in_forked_process (test.test_threading.ThreadJoinOnShutdown) ... skipped 'needs os.fork()'
test_3_join_in_forked_from_thread (test.test_threading.ThreadJoinOnShutdown) ... skipped 'needs os.fork()'
test_4_daemon_threads (test.test_threading.ThreadJoinOnShutdown) ... ok
test_clear_threads_states_after_fork (test.test_threading.ThreadJoinOnShutdown) ... skipped 'needs os.fork()'
test_reinit_tls_after_fork (test.test_threading.ThreadJoinOnShutdown) ... skipped 'needs os.fork()'
test_BoundedSemaphore_limit (test.test_threading.ThreadTests) ... ok
test_PyThreadState_SetAsyncExc (test.test_threading.ThreadTests) ... started worker thread
trying nonsensical thread id
waiting for worker thread to get started
verifying worker hasn't exited
attempting to raise asynch exception in worker
waiting for worker to say it caught the exception
all OK -- joining worker
ok
test_daemon_param (test.test_threading.ThreadTests) ... ok
test_dummy_thread_after_fork (test.test_threading.ThreadTests) ... skipped 'test needs fork()'
test_enumerate_after_join (test.test_threading.ThreadTests) ... ok
test_finalize_runnning_thread (test.test_threading.ThreadTests) ... ok
test_finalize_with_trace (test.test_threading.ThreadTests) ... ok
test_foreign_thread (test.test_threading.ThreadTests) ... ok
test_frame_tstate_tracing (test.test_threading.ThreadTests) ... ok
test_ident_of_no_threading_threads (test.test_threading.ThreadTests) ... ok
test_is_alive_after_fork (test.test_threading.ThreadTests) ... skipped 'needs os.fork()'
test_join_nondaemon_on_shutdown (test.test_threading.ThreadTests) ... ok
test_limbo_cleanup (test.test_threading.ThreadTests) ... ok
test_main_thread (test.test_threading.ThreadTests) ... ok
test_main_thread_after_fork (test.test_threading.ThreadTests) ... skipped 'test needs os.fork()'
test_main_thread_after_fork_from_nonmain_thread (test.test_threading.ThreadTests) ... skipped 'test needs os.fork()'
test_main_thread_during_shutdown (test.test_threading.ThreadTests) ... ok
test_no_refcycle_through_target (test.test_threading.ThreadTests) ... ok
test_old_threading_api (test.test_threading.ThreadTests) ... ok
test_repr_daemon (test.test_threading.ThreadTests) ... ok
test_repr_stopped (test.test_threading.ThreadTests) ... ok
test_tstate_lock (test.test_threading.ThreadTests) ... ok
test_various_ops (test.test_threading.ThreadTests) ... task <thread 0> will run for 85.6 usec
1 tasks are running
task <thread 1> will run for 73.9 usec
2 tasks are running
task <thread 2> will run for 44.5 usec
3 tasks are running
task <thread 3> will run for 59.1 usec
task <thread 4> will run for 86.0 usec
task <thread 5> will run for 69.7 usec
task <thread 6> will run for 61.3 usec
task <thread 7> will run for 45.1 usec
task <thread 8> will run for 73.7 usec
task <thread 9> will run for 79.5 usec
waiting for all tasks to complete
task <thread 1> done
<thread 1> is finished. 2 tasks are running
3 tasks are running
task <thread 0> done
<thread 0> is finished. 2 tasks are running
task <thread 2> done
<thread 2> is finished. 1 tasks are running
2 tasks are running
3 tasks are running
task <thread 3> done
<thread 3> is finished. 2 tasks are running
task <thread 5> done
<thread 5> is finished. 1 tasks are running
2 tasks are running
task <thread 4> done
<thread 4> is finished. 1 tasks are running
2 tasks are running
3 tasks are running
task <thread 7> done
<thread 7> is finished. 2 tasks are running
task <thread 8> done
<thread 8> is finished. 1 tasks are running
task <thread 6> done
<thread 6> is finished. 0 tasks are running
1 tasks are running
task <thread 9> done
<thread 9> is finished. 0 tasks are running
all tasks done
ok
test_various_ops_large_stack (test.test_threading.ThreadTests) ... with 1 MiB thread stack size...
task <thread 0> will run for 67.0 usec
1 tasks are running
task <thread 1> will run for 38.6 usec
2 tasks are running
task <thread 2> will run for 92.5 usec
3 tasks are running
task <thread 3> will run for 20.2 usec
task <thread 4> will run for 8.1 usec
task <thread 5> will run for 22.2 usec
task <thread 6> will run for 44.3 usec
task <thread 7> will run for 5.4 usec
task <thread 8> will run for 23.9 usec
task <thread 9> will run for 90.1 usec
waiting for all tasks to complete
task <thread 2> done
<thread 2> is finished. 2 tasks are running
3 tasks are running
task <thread 1> done
<thread 1> is finished. 2 tasks are running
task <thread 0> done
<thread 0> is finished. 1 tasks are running
2 tasks are running
3 tasks are running
task <thread 5> done
<thread 5> is finished. 2 tasks are running
task <thread 4> done
<thread 4> is finished. 1 tasks are running
task <thread 3> done
<thread 3> is finished. 0 tasks are running
1 tasks are running
2 tasks are running
3 tasks are running
task <thread 6> done
<thread 6> is finished. 2 tasks are running
task <thread 8> done
<thread 8> is finished. 1 tasks are running
2 tasks are running
task <thread 7> done
<thread 7> is finished. 1 tasks are running
task <thread 9> done
<thread 9> is finished. 0 tasks are running
all tasks done
ok
test_various_ops_small_stack (test.test_threading.ThreadTests) ... with 256 KiB thread stack size...
task <thread 0> will run for 85.7 usec
1 tasks are running
task <thread 1> will run for 86.1 usec
2 tasks are running
task <thread 2> will run for 72.6 usec
3 tasks are running
task <thread 3> will run for 90.1 usec
task <thread 4> will run for 15.2 usec
task <thread 5> will run for 94.1 usec
task <thread 6> will run for 29.9 usec
task <thread 7> will run for 62.4 usec
task <thread 8> will run for 95.2 usec
task <thread 9> will run for 95.0 usec
waiting for all tasks to complete
task <thread 2> done
<thread 2> is finished. 2 tasks are running
task <thread 1> done
<thread 1> is finished. 1 tasks are running
task <thread 0> done
<thread 0> is finished. 0 tasks are running
1 tasks are running
2 tasks are running
3 tasks are running
task <thread 4> done
<thread 4> is finished. 2 tasks are running
task <thread 3> done
<thread 3> is finished. 1 tasks are running
2 tasks are running
3 tasks are running
task <thread 5> done
<thread 5> is finished. 2 tasks are running
3 tasks are running
task <thread 8> done
<thread 8> is finished. 2 tasks are running
task <thread 7> done
<thread 7> is finished. 1 tasks are running
task <thread 6> done
<thread 6> is finished. 0 tasks are running
1 tasks are running
task <thread 9> done
<thread 9> is finished. 0 tasks are running
all tasks done
ok
test_bare_raise_in_brand_new_thread (test.test_threading.ThreadingExceptionTests) ... ok
test_daemonize_active_thread (test.test_threading.ThreadingExceptionTests) ... ok
test_joining_current_thread (test.test_threading.ThreadingExceptionTests) ... ok
test_joining_inactive_thread (test.test_threading.ThreadingExceptionTests) ... ok
test_print_exception (test.test_threading.ThreadingExceptionTests) ... ok
test_print_exception_stderr_is_none_1 (test.test_threading.ThreadingExceptionTests) ... ok
test_print_exception_stderr_is_none_2 (test.test_threading.ThreadingExceptionTests) ... ok
test_recursion_limit (test.test_threading.ThreadingExceptionTests) ... skipped 'test macosx problem'
test_releasing_unacquired_lock (test.test_threading.ThreadingExceptionTests) ... ok
test_start_thread_again (test.test_threading.ThreadingExceptionTests) ... ok
test_init_immutable_default_args (test.test_threading.TimerTests) ... ok
======================================================================
ERROR: test_default_timeout (test.test_threading.BarrierTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "D:\buildarea\3.x.bolen-windows10\build\lib\test\lock_tests.py", line 944, in test_default_timeout
self.run_threads(f)
File "D:\buildarea\3.x.bolen-windows10\build\lib\test\lock_tests.py", line 773, in run_threads
f()
File "D:\buildarea\3.x.bolen-windows10\build\lib\test\lock_tests.py", line 939, in f
i = barrier.wait()
File "D:\buildarea\3.x.bolen-windows10\build\lib\threading.py", line 613, in wait
self._wait(timeout)
File "D:\buildarea\3.x.bolen-windows10\build\lib\threading.py", line 651, in _wait
raise BrokenBarrierError
threading.BrokenBarrierError
----------------------------------------------------------------------
Ran 158 tests in 24.754s
FAILED (errors=1, skipped=9)
test test_threading failed
test_pwd skipped -- No module named 'pwd'
test_poll skipped -- select.poll not defined
test_ioctl skipped -- No module named 'fcntl'
test_posix skipped -- No module named 'posix'
test_zipfile64 skipped -- test requires loads of disk-space bytes and a long time to run
Could Not Find D:\buildarea\3.x.bolen-windows10\build\PCbuild\python*.zip |
Sorry, something went wrong.
|
In looking at this I don't think build 2469 on the buildbot should have been marked failed, but rather been a warning, as the re-run of test_threading seems to have been successful. But it looks like with this change, both runs were considered failures. It seems to be affecting other builders too (e.g., the last two builds (118 and 71) on cstratak-fedora). It looks like there's a discrepancy in field order in the new TestResult namedtuple and the test re-run logic. The re-run logic assumes [0] is the result, but it's at [1] in the tuple. However, the new runtest function does documents the result at [0], but it's missing the test_name field. |
Sorry, something went wrong.
That's https://bugs.python.org/issue11871 : someone should have a look :-) |
Sorry, something went wrong.
* Clean up code which checked presence of os.{stat,lstat,chmod} (GH-11643)
(cherry picked from commit 8377cd4)
* bpo-36725: regrtest: add TestResult type (GH-12960)
* Add TestResult and MultiprocessResult types to ensure that results
always have the same fields.
* runtest() now handles KeyboardInterrupt
* accumulate_result() and format_test_result() now takes a TestResult
* cleanup_test_droppings() is now called by runtest() and mark the
test as ENV_CHANGED if the test leaks support.TESTFN file.
* runtest() now includes code "around" the test in the test timing
* Add print_warning() in test.libregrtest.utils to standardize how
libregrtest logs warnings to ease parsing the test output.
* support.unload() is now called with abstest rather than test_name
* Rename 'test' variable/parameter to 'test_name'
* dash_R(): remove unused the_module parameter
* Remove unused imports
(cherry picked from commit 4d29983)
* bpo-36725: Refactor regrtest multiprocessing code (GH-12961)
Rewrite run_tests_multiprocess() function as a new MultiprocessRunner
class with multiple methods to better report errors and stop
immediately when needed.
Changes:
* Worker processes are now killed immediately if tests are
interrupted or if a test does crash (CHILD_ERROR): worker
processes are killed.
* Rewrite how errors in a worker thread are reported to
the main thread. No longer ignore BaseException or parsing errors
silently.
* Remove 'finished' variable: use worker.is_alive() instead
* Always compute omitted tests. Add Regrtest.get_executed() method.
(cherry picked from commit 3cde440)
* bpo-36719: regrtest always detect uncollectable objects (GH-12951)
regrtest now always detects uncollectable objects. Previously, the
check was only enabled by --findleaks. The check now also works with
-jN/--multiprocess N.
--findleaks becomes a deprecated alias to --fail-env-changed.
(cherry picked from commit 75120d2)
* bpo-34060: Report system load when running test suite for Windows (GH-8357)
While Windows exposes the system processor queue length, the raw value
used for load calculations on Unix systems, it does not provide an API
to access the averaged value. Hence to calculate the load we must track
and average it ourselves. We can't use multiprocessing or a thread to
read it in the background while the tests run since using those would
conflict with test_multiprocessing and test_xxsubprocess.
Thus, we use Window's asynchronous IO API to run the tracker in the
background with it sampling at the correct rate. When we wish to access
the load we check to see if there's new data on the stream, if there is,
we update our load values.
(cherry picked from commit e16467a)
* bpo-36719: Fix regrtest re-run (GH-12964)
Properly handle a test which fail but then pass.
Add test_rerun_success() unit test.
(cherry picked from commit 837acc1)
* bpo-36719: regrtest closes explicitly WindowsLoadTracker (GH-12965)
Regrtest.finalize() now closes explicitly the WindowsLoadTracker
instance.
(cherry picked from commit 00db7c7)
always have the same fields.
test as ENV_CHANGED if the test leaks support.TESTFN file.
libregrtest logs warnings to ease parsing the test output.
https://bugs.python.org/issue36725