mirror of
https://github.com/python/cpython.git
synced 2025-11-25 21:11:09 +00:00
gh-109276: libregrtest: fix worker working dir (#109313)
Fix Emscripten and WASI: start the test worker process in the Python source code directory, where 'python.js' and 'python.wasm' can be found. Then worker_process() changes to a temporary directory created to run tests. * create_worker_process() uses os_helper.SAVEDCWD as cwd. * worker_process() uses get_temp_dir() as the parent directory for get_work_dir(). * Don't use plural but singual for "test" in "Run 1 test ..." message. * Remove unused imports. * Add WORK_DIR_PREFIX and WORKER_WORK_DIR_PREFIX constants.
This commit is contained in:
parent
8b55adfa8f
commit
d13f782a18
4 changed files with 24 additions and 16 deletions
|
|
@ -297,7 +297,7 @@ class Regrtest:
|
|||
|
||||
jobs = runtests.get_jobs()
|
||||
if jobs is not None:
|
||||
tests = f'{jobs} tests'
|
||||
tests = count(jobs, 'test')
|
||||
else:
|
||||
tests = 'tests'
|
||||
msg = f"Run {tests} sequentially"
|
||||
|
|
@ -458,7 +458,7 @@ class Regrtest:
|
|||
|
||||
def run_tests(self, selected: TestTuple, tests: TestList | None) -> int:
|
||||
os.makedirs(self.tmp_dir, exist_ok=True)
|
||||
work_dir = get_work_dir(parent_dir=self.tmp_dir)
|
||||
work_dir = get_work_dir(self.tmp_dir)
|
||||
|
||||
# Put a timeout on Python exit
|
||||
with exit_timeout():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue