Add --test-threads option to test binaries #35414

Merged
merged 1 commit into from Aug 13, 2016

Conversation

Projects
None yet
7 participants
@jupp0r
Contributor

jupp0r commented Aug 6, 2016

This change allows parallelism of test runs to be specified by a
command line flag named --test-threads in addition to the existing
environment variable RUST_TEST_THREADS. Fixes #25636.

@rust-highfive

This comment has been minimized.

Show comment
Hide comment
@rust-highfive

rust-highfive Aug 6, 2016

Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @aturon (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

Collaborator

rust-highfive commented Aug 6, 2016

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @aturon (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@alexcrichton alexcrichton assigned alexcrichton and unassigned aturon Aug 7, 2016

@alexcrichton

This comment has been minimized.

Show comment
Hide comment
@alexcrichton

alexcrichton Aug 7, 2016

Member

Seems reasonable to me, thanks for the PR! I'd also be fine just calling this --threads.

cc @rust-lang/tools

Member

alexcrichton commented Aug 7, 2016

Seems reasonable to me, thanks for the PR! I'd also be fine just calling this --threads.

cc @rust-lang/tools

@alexcrichton alexcrichton added the T-tools label Aug 7, 2016

Add --test-threads option to test binaries
This change allows parallelism of test runs to be specified by a
command line flag names --test-threads in addition to the existing
environment variable RUST_TEST_THREADS. Fixes #25636.
@jupp0r

This comment has been minimized.

Show comment
Hide comment
@jupp0r

jupp0r Aug 7, 2016

Contributor

I thought about calling the flag --threads, but decided against it because other threads might as well be spawned in tests and I wanted to avoid the impression that the flag limits the overall number of threads being created. I don't have a strong opinion, though.

Contributor

jupp0r commented Aug 7, 2016

I thought about calling the flag --threads, but decided against it because other threads might as well be spawned in tests and I wanted to avoid the impression that the flag limits the overall number of threads being created. I don't have a strong opinion, though.

@brson

This comment has been minimized.

Show comment
Hide comment
@brson

brson Aug 11, 2016

Contributor

sgtm

Contributor

brson commented Aug 11, 2016

sgtm

@alexcrichton

This comment has been minimized.

Show comment
Hide comment
@alexcrichton

alexcrichton Aug 11, 2016

Member

Discussed with the tools team --test-threads seemed like a good choice to us, thanks @jupp0r!

@bors: r+

Member

alexcrichton commented Aug 11, 2016

Discussed with the tools team --test-threads seemed like a good choice to us, thanks @jupp0r!

@bors: r+

@bors

This comment has been minimized.

Show comment
Hide comment
@bors

bors Aug 11, 2016

Contributor

📌 Commit 6ca9094 has been approved by alexcrichton

Contributor

bors commented Aug 11, 2016

📌 Commit 6ca9094 has been approved by alexcrichton

@brson brson added the relnotes label Aug 12, 2016

Manishearth added a commit to Manishearth/rust that referenced this pull request Aug 13, 2016

Rollup merge of #35414 - jupp0r:feature/test-threads-flag, r=alexcric…
…hton

Add --test-threads option to test binaries

This change allows parallelism of test runs to be specified by a
command line flag names --test-threads in addition to the existing
environment variable RUST_TEST_THREADS. Fixes #25636.

bors added a commit that referenced this pull request Aug 13, 2016

Auto merge of #35639 - Manishearth:rollup, r=Manishearth
Rollup of 9 pull requests

- Successful merges: #35348, #35392, #35414, #35444, #35447, #35491, #35533, #35538, #35539
- Failed merges: #35409
@bors

This comment has been minimized.

Show comment
Hide comment
@bors

bors Aug 13, 2016

Contributor

⌛️ Testing commit 6ca9094 with merge 2b7ea14...

Contributor

bors commented Aug 13, 2016

⌛️ Testing commit 6ca9094 with merge 2b7ea14...

bors added a commit that referenced this pull request Aug 13, 2016

Auto merge of #35414 - jupp0r:feature/test-threads-flag, r=alexcrichton
Add --test-threads option to test binaries

This change allows parallelism of test runs to be specified by a
command line flag names --test-threads in addition to the existing
environment variable RUST_TEST_THREADS. Fixes #25636.

@bors bors merged commit 6ca9094 into rust-lang:master Aug 13, 2016

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details

@dtolnay dtolnay referenced this pull request in laumann/compiletest-rs Aug 16, 2016

Closed

Fails to build on 1.12.0-nightly (197be89f3 2016-08-15) #44

@rjayatilleka rjayatilleka referenced this pull request in ProtonLights/proton-cli Sep 29, 2016

Open

Rust 1.12 --test-threads #38

@zpgaal

This comment has been minimized.

Show comment
Hide comment
@zpgaal

zpgaal Feb 19, 2018

Is it possible to check/assert for the number of threads in a test-case ?
Some of my tests shall run in a single thread. This flags solves half of my problem, but need to assert/ensure that, no other test-threads effects my running test if the command line argument was forgotten.

zpgaal commented Feb 19, 2018

Is it possible to check/assert for the number of threads in a test-case ?
Some of my tests shall run in a single thread. This flags solves half of my problem, but need to assert/ensure that, no other test-threads effects my running test if the command line argument was forgotten.

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