Uh oh!
There was an error while loading. Please reload this page.
gh-119727: Add --single-process option to regrtest - #119728
Conversation
vstinner
commented
May 29, 2024
serhiy-storchaka
left a comment
There was a problem hiding this comment.
Alternative names are --singleprocess and --no-multiprocess, which more accurately describe the effect, but this is up to you.
I think that the implementation can be simplified by reusing the same destination variable. It is more common in such cases.
| group.add_argument('-j', '--multiprocess', metavar='PROCESSES', | ||
| dest='use_mp', type=int, | ||
| help='run PROCESSES processes at once') | ||
| group.add_argument('--sequentially', action='store_true', |
There was a problem hiding this comment.
You can also implement it as action='store_const', dest='use_mp', const=None.
| NEED_TTY = set(''' | ||
| test_ioctl | ||
| '''.split()) | ||
| NEED_TTY = { |
There was a problem hiding this comment.
Yeah, it's a follow-up of a previous PR. I didn't want to write a dedicated PR for that.
vstinner
commented
May 31, 2024
hugovk
commented
May 31, 2024
My first thought is to use something like This is similar to pytest-xdist ( |
Currently, -j1 runs tests sequentially but spawn a new process for each test file: see #119727 (comment). I'm open to consider changing this behavior. |
hugovk
commented
May 31, 2024
Do you think anyone will realistically want to run sequentially and spawn a new process for each? My guess is not. |
vstinner
commented
Jun 3, 2024
I'm a little bit worried that some projects currently run tests with According to the discussion, the least bad choice is |
hugovk
commented
Jun 3, 2024
Then I'd include a hyphen for readability/accessibility: We have a mixture of options with and without hyphens, so consistency isn't a problem :) |
vstinner
commented
Jun 3, 2024
I updated the PR to use |
serhiy-storchaka
commented
Jun 3, 2024
It does not really matter. It was just a tiny nitpick from my side. Use the name that you like if you are sure that it will not create problems in future. |
Uh oh!
There was an error while loading. Please reload this page.
…aZM.rst Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13. |
Sorry, @vstinner, I could not cleanly backport this to |
mhsmith
commented
Aug 14, 2024
I'll submit a backport of this because it would be useful for the iOS and Android buildbots – #122992 (comment). |
(cherry picked from commit 4e8aa32)
GH-123010 is a backport of this pull request to the 3.13 branch. |
Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12. |
Sorry, @vstinner, I could not cleanly backport this to |
…onGH-119728) (cherry picked from commit 4e8aa32) Co-authored-by: Victor Stinner <vstinner@python.org>
GH-130359 is a backport of this pull request to the 3.12 branch. |
--single-processoption to regrtest to always run tests sequentially (ignore-jNoption) #119727