Skip to content

Add --single-process option to regrtest to always run tests sequentially (ignore -jN option) #119727

Description

@vstinner

The Python release process runs tests sequentially. It catchs some issues which are ignored silently when running tests in parallel.

I propose adding --sequentially option to regrtest to always run tests sequentially. It can be used to ignore any -jN option and also to re-run failed tests sequentially.

Linked PRs

Activity

  1. added 2 commits that reference this issue on May 29, 2024
  2. vstinner commented on May 29, 2024

    @vstinner
    MemberAuthor

    My motivation for this change is also a desire to change the regrtest default to -j0: run tests in parallel using the number of CPU.

  3. added
    testsTests in the Lib/test dir
    type-featureA feature request or enhancement
    on May 29, 2024
  4. serhiy-storchaka commented on May 29, 2024

    @serhiy-storchaka
    Member

    This is an opposite of --multiprocess. Why not call it --singleprocess?

    You can run tests with -j1, it will be sequentially, but in different processes.

  5. vstinner commented on May 30, 2024

    @vstinner
    MemberAuthor

    IMO "sequentially" is the right name. --multiprocess means in fact "running tests in parallel". Using multipe processes is just an implementation details. It could be threads or something else. The opposite of parallel is sequential. IMO it's too late to rename the --multiprocess option.

    Note: there is already a --single option. --singleprocess sounds too close.

  6. serhiy-storchaka commented on May 30, 2024

    @serhiy-storchaka
    Member

    I will not insist.

    The --multiprocess option has two effects: it runs the tests in parallel and runs every test is a separate process. It could be possible to run the tests in parallel using the process pull, but this is not how it is implemented now, and I do not think there is a benefit to implement such option. Currently there are three options:

    • Run the tests sequentially in the same (main) process. By default.
    • Run the tests sequentially in separate processes. -j1.
    • Run the tests in parallel in separate processes. -jN.
  7. added a commit that references this issue on Jun 3, 2024
  8. changed the title [-]Add `--sequentially` option to regrtest to always run tests sequentially (ignore `-jN` option)[/-] [+]Add `--single-process` option to regrtest to always run tests sequentially (ignore `-jN` option)[/+] on Jun 3, 2024
  9. added a commit that references this issue on Jun 3, 2024
  10. added a commit that references this issue on Jun 5, 2024
  11. added 3 commits that reference this issue on Jun 13, 2024
  12. vstinner commented on Jun 13, 2024

    @vstinner
    MemberAuthor

    Implemented by change 4e8aa32.

  13. added a commit that references this issue on Jul 11, 2024
  14. added a commit that references this issue on Jul 17, 2024
  15. added a commit that references this issue on Aug 14, 2024
  16. added a commit that references this issue on Aug 26, 2024
  17. added 2 commits that reference this issue on Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    testsTests in the Lib/test dirtype-featureA feature request or enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions