]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-109276: libregrtest: fix worker working dir (#109313)
authorVictor Stinner <vstinner@python.org>
Tue, 12 Sep 2023 13:13:29 +0000 (15:13 +0200)
committerGitHub <noreply@github.com>
Tue, 12 Sep 2023 13:13:29 +0000 (15:13 +0200)
commitd13f782a181d579fc3c23ea6059ff352ec9fab93
treede2a48f54303d2beec53f36538c8887234d98fae
parent8b55adfa8ff05477b4be7def36db7b66c73f181d
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.
Lib/test/libregrtest/main.py
Lib/test/libregrtest/run_workers.py
Lib/test/libregrtest/utils.py
Lib/test/libregrtest/worker.py