-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
gh-109276: libregrtest: add RunTests.work_dir #109290
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
Conversation
vstinner
commented
Sep 11, 2023
•
edited by bedevere-app
bot
Loading
edited by bedevere-app
bot
- WorkerThread now always creates a temporary directory, even on Emscripten and WASI: it's used as the working directory of the test worker process.
- 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() goes to the temporary directory created to run tests.
- Issue: Enhance Python regrtest test runner (test.libregrtest) #109276
8a62de0
to
3169629
Compare
This PR fix how libregrtest creates temporary directories for worker processes and which directory is used as the working directory of worker processes. It seems like two tests fail with this change since they leak temporary files/directories!
|
Oh, and Windows two tests also failed, but other tests: test_generated_cases and test_os.
and
|
b7dec3c
to
0507687
Compare
* Enable collect_sysconfig() on Windows. * Add sysconfig 'abs_builddir' and 'srcdir' * Add sysconfig.is_python_build() * Add tempfile.gettempdir() * Remove compatiblity with Python 2.7 (print_function).
* WorkerThread now always creates a temporary directory, even on Emscripten and WASI: it's used as the working directory of the test worker process. * 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() goes to the temporary directory created to run tests. * --cleanup now also removes "temporary" directories of test worker processes (in /tmp).
0507687
to
389be3d
Compare
Many tests fail on the macOS CI because the AF_UNIX domain name is too longer (more than ~100 bytes):
The main test process:
A worker test process:
multiprocessing.util.get_temp_dir() creates a temporary directory with multiprocessing.connection.arbitrary_connection(AF_UNIX) creates a A UNIX domain name liike |
Windows x64:
test.pythoninfo:
Main test process:
A test worker process:
test_generated_cases was skipped:
|
PR #106219 is awaiting for an Emscripten/WASI fix for libregrtest. |
This change seems to be too disruptive, so I wrote a more conservative change (come back to old behavior): PR #109313. |
Merged. I close this PR. |