Skip to content

gh-109276: libregrtest: fix worker working dir #109313

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 12, 2023

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Sep 12, 2023

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.

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.
@vstinner vstinner enabled auto-merge (squash) September 12, 2023 07:07
@vstinner vstinner disabled auto-merge September 12, 2023 07:12
@vstinner vstinner added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Sep 12, 2023
@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @vstinner for commit 66f5537 🤖

If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Sep 12, 2023
@vstinner vstinner merged commit d13f782 into python:main Sep 12, 2023
@vstinner vstinner deleted the regrtest_tmp_dir branch September 12, 2023 13:13
@vstinner
Copy link
Member Author

Oh wow, sadly, tons of buildbot workers are failing currently :-( But there are already failing on the main branch, it's not related to this change: https://buildbot.python.org/all/#/release_status

Sadly (again), wasm/wasi is not fixed: my regrtest json FD feature doesn't work on wasi/wasi and so tests are still broken :-(

@vstinner
Copy link
Member Author

Sadly (again), wasm/wasi is not fixed: my regrtest json FD feature doesn't work on wasi/wasi and so tests are still broken :-(

I wrote PR #109326 to fix it.

vstinner added a commit to vstinner/cpython that referenced this pull request Sep 13, 2023
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants