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
test directory doubly-nested running tests with -j/--multiprocess #59505
Comments
Running tests using the -j/--multiprocess option doubly-nests the test working directory: $ ./python.exe -m test -j3
-->cpython/build/test_python_63955/build/test_python_63956
$ ./python.exe -m test
-->cpython/build/test_python_63957 It seems like the test directories for different processes should be siblings when running in multiprocessing mode as opposed to doubly-nesting under a new build directory. |
Attaching a small refactoring patch to eliminate some cut-and-paste, prior to fixing this issue. |
And here is the second part. Combining this with the first patch provides a fix. |
Here is a single combined patch. I gather this is preferred. |
After this patch, it's clear that TEMPDIR and TESTCWD no longer have to be global variables. I can make that a separate issue after this one. |
I don't really like the "pre-parsed option" hack. Can't we think of something simpler? For example, why would the child be involved, rather than simply the parent setting the right cwd? Also, I don't think there's any point in _OPTION_CWD_PARENT_DIR. Just hard-code the literal, it will be more readable. |
Thanks for your feedback, Antoine, and for causing me to rethink the patch. This patch is drastically simpler. Incidentally, I found a reason for this issue in bpo-15322. regrtest calculates the "build" folder relative to sysconfig.get_config_var('srcdir'). Because the latter returns the current working directory instead of the source directory, the build folders were getting nested. |
Thanks, Chris. I haven't tested the patch but it looks fine. |
New changeset 724a6e0e35f0 by Antoine Pitrou in branch '3.2': New changeset 4752fafb579d by Antoine Pitrou in branch 'default': |
Committed now. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: