(self, selected: TestTuple, tests: TestList | None)
| 578 | self.fail_rerun) |
| 579 | |
| 580 | def run_tests(self, selected: TestTuple, tests: TestList | None) -> int: |
| 581 | os.makedirs(self.tmp_dir, exist_ok=True) |
| 582 | work_dir = get_work_dir(self.tmp_dir) |
| 583 | |
| 584 | # Put a timeout on Python exit |
| 585 | with exit_timeout(): |
| 586 | # Run the tests in a context manager that temporarily changes the |
| 587 | # CWD to a temporary and writable directory. If it's not possible |
| 588 | # to create or change the CWD, the original CWD will be used. |
| 589 | # The original CWD is available from os_helper.SAVEDCWD. |
| 590 | with os_helper.temp_cwd(work_dir, quiet=True): |
| 591 | # When using multiprocessing, worker processes will use |
| 592 | # work_dir as their parent temporary directory. So when the |
| 593 | # main process exit, it removes also subdirectories of worker |
| 594 | # processes. |
| 595 | return self._run_tests(selected, tests) |
| 596 | |
| 597 | def _add_cross_compile_opts(self, regrtest_opts): |
| 598 | # WASM/WASI buildbot builders pass multiple PYTHON environment |
no test coverage detected