gh-109162: libregrtest: rename runtest_mp.py to run_workers.py (#109248)

* Rename runtest_mp.py to run_workers.py
* Move exit_timeout() and temp_cwd() context managers from
  Regrtest.main() to Regrtest.run_tests(). Actions like --list-tests
  or --list-cases don't need these protections.
* Regrtest: remove selected and tests attributes. Pass 'selected' to
  list_tests(), list_cases() and run_tests(). display_result() now
  expects a TestTuple, instead of TestList.
* Rename setup_tests() to setup_process() and rename setup_support()
  to setup_tests().
* Move _adjust_resource_limits() to utils and rename it to
  adjust_rlimit_nofile().
* Move replace_stdout() to utils.
* Fix RunTests.verbose type: it's an int.
This commit is contained in:
Victor Stinner 2023-09-11 05:27:37 +02:00 committed by GitHub
parent 0b6b05391b
commit 0c139b5f2f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 171 additions and 164 deletions

View file

@ -15,7 +15,7 @@ from test.support import threading_helper
from test.libregrtest.result import State, TestResult
from test.libregrtest.runtests import RunTests
from test.libregrtest.save_env import saved_test_environment
from test.libregrtest.setup import setup_support
from test.libregrtest.setup import setup_tests
from test.libregrtest.utils import (
TestName,
clear_caches, remove_testfn, abs_module_name, print_warning)
@ -201,7 +201,7 @@ def _runtest(result: TestResult, runtests: RunTests) -> None:
faulthandler.dump_traceback_later(timeout, exit=True)
try:
setup_support(runtests)
setup_tests(runtests)
if output_on_failure:
support.verbose = True