Skip to content
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

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

Merged
merged 1 commit into from
Aug 13, 2016

Conversation

jupp0r
Copy link
Contributor

@jupp0r 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
Copy link
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.

@alexcrichton alexcrichton assigned alexcrichton and unassigned aturon Aug 7, 2016
@alexcrichton
Copy link
Member

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

cc @rust-lang/tools

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 rust-lang#25636.
@jupp0r
Copy link
Contributor Author

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
Copy link
Contributor

brson commented Aug 11, 2016

sgtm

@alexcrichton
Copy link
Member

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

@bors: r+

@bors
Copy link
Contributor

bors commented Aug 11, 2016

📌 Commit 6ca9094 has been approved by alexcrichton

@brson brson added the relnotes Marks issues that should be documented in the release notes of the next release. label Aug 12, 2016
Manishearth added a commit to Manishearth/rust that referenced this pull request Aug 13, 2016
…=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 rust-lang#25636.
@bors
Copy link
Contributor

bors commented Aug 13, 2016

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

bors added a commit that referenced this pull request Aug 13, 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.
@ghost
Copy link

ghost 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
Labels
relnotes Marks issues that should be documented in the release notes of the next release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants