Skip to content

runtests: introduce a subset option - #22616

Closed
bagder wants to merge 1 commit into
masterfrom
bagder/runtests-subset
Closed

bagder wants to merge 1 commit into
masterfrom
bagder/runtests-subset

Conversation

@bagder

@bagder bagder commented Aug 18, 2026

Copy link
Copy Markdown
Member

To make it easier to run different subsets of the tests in separate invokes.

@bagder bagder added the tests label Aug 18, 2026
@bagder

bagder commented Aug 18, 2026

Copy link
Copy Markdown
Member Author

@vszakats thoughts?

@bagder
bagder marked this pull request as ready for review August 18, 2026 10:06
@vszakats

Copy link
Copy Markdown
Member

@bagder I like it!

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a --subset=<section>/<parts> option to tests/runtests.pl to allow splitting a selected test set into multiple invocations (useful for parallelizing runs), along with user-facing documentation in docs/runtests.md.

Changes:

  • Add --subset=<section>/<parts> command-line parsing to tests/runtests.pl.
  • Implement logic to slice the computed $TESTCASES list into a specific subset “part”.
  • Document the new option and provide usage examples in docs/runtests.md.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
tests/runtests.pl Adds --subset option parsing and implements subset selection on $TESTCASES.
docs/runtests.md Documents --subset behavior and examples.
Suppressed comments (3)

docs/runtests.md:269

  • Wording: "zero prefixed" is misleading here; the docs describe a zero-based index.
*section* is zero prefixed so it must be smaller than *parts*.

docs/runtests.md:271

  • Spelling: "rest run" looks like a typo; should be "test run".
Using this option you can for example split up an identical rest run into

docs/runtests.md:272

  • Grammar: "combined runs" should be "combined run".
three separate invokes that combined runs all the tests:

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread tests/runtests.pl Resolved
Comment thread tests/runtests.pl Resolved
Comment thread docs/runtests.md Resolved
To make it easier to run different subsets of the tests in separate
invokes.

Closes #22616
@bagder
bagder force-pushed the bagder/runtests-subset branch from 5807e96 to bf33f6e Compare August 18, 2026 10:19
@vszakats

vszakats commented Aug 18, 2026 •

Copy link
Copy Markdown
Member

It's working great as tested in #22617,
e.g. https://github.com/curl/curl/actions/runs/32131425649/job/95693222705?pr=22617:

* Args: -a -t -j20 -t --shallow=25 --min=0 --subset=0/2 --buildinfo
* Jobs: 20
* Seed: 254678
Subset: 1/2 of the tests (run 1025 tests out of 2049). Part 0
[...]
TESTDONE: 1003 tests out of 1003 reported OK: 100%

(I disable minimums since it's not strictly critical to check in all jobs, but also testing now if it works to divide by total subsets, rough method, but maybe.)

@bagder

bagder commented Aug 18, 2026

Copy link
Copy Markdown
Member Author

Excellent, I'll merge this.

@bagder bagder closed this in e669179 Aug 18, 2026
@bagder
bagder deleted the bagder/runtests-subset branch August 18, 2026 11:46
vszakats added a commit to vszakats/curl that referenced this pull request Aug 18, 2026
When both are set, to improve the default. It may still need manual
adjustment in cases (in CI for example, the Windows job was like this,
and the planned riscv64 one).

Ref: curl#22617
Follow-up to e669179 curl#22616
vszakats added a commit that referenced this pull request Aug 18, 2026
When the minimum comes from `CURL_TEST_MIN`, to improve the default
behavior. It may still need manual adjustment in cases.

Follow-up to e669179 #22616
Follow-up to 58cb1e2 #22618
Cherry-picked from #22617

Closes #22619
vszakats added a commit that referenced this pull request Aug 18, 2026
Also:
- drop most hand-tuned `--min` options, in favor of defaults.
- enable tests on emulated riscv64.
  Suggested-by: Dan Fandrich
  Ref: #22590 (comment)
- drop building examples on emulated riscv64.

Adding around 3.5 minutes to the riscv64 job:
0.5 Perl install, 2 minutes to build tests, 1 minute to run 100 tests.

Follow-up to 6648669 #22619
Follow-up to e669179 #22616
Follow-up to 58cb1e2 #22618
Follow-up to d000006 #22602

Closes #22617
@dfandrich

dfandrich commented Aug 18, 2026 via email

Copy link
Copy Markdown
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

4 participants