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 a --test-threads option for rustc test binaries #25636

Closed
jimmycuadra opened this issue May 20, 2015 · 4 comments
Closed

Add a --test-threads option for rustc test binaries #25636

jimmycuadra opened this issue May 20, 2015 · 4 comments
Labels
A-frontend Area: Compiler frontend (errors, parsing and HIR) C-enhancement Category: An issue proposing an enhancement or a PR with one.

Comments

@jimmycuadra
Copy link
Contributor

Discussion carried over from: rust-lang/cargo#1591

Test binaries created by rustc should have a --test-threads option instead of (in addition to?) controlling the thread count with RUST_TEST_THREADS. It's not a consistent user experience to have some functionality controlled via environment variables and some via command line options. CLI options should be preferred since they encourage users to keep configuration local to a single execution of a test binary and not export it globally, making it affect other test runs perhaps accidentally. It would also make the output of test_binary -h more uniform and compact.

@steveklabnik steveklabnik added A-frontend Area: Compiler frontend (errors, parsing and HIR) C-enhancement Category: An issue proposing an enhancement or a PR with one. labels May 21, 2015
@brson
Copy link
Contributor

brson commented May 27, 2015

Agreed.

@nixpulvis
Copy link

The ability to specify this in the Cargo.toml somehow might be nice. One of my crates I'm working on needs all the tests run like this.

@steveklabnik
Copy link
Member

It is already set table by an env var, no? Cargo just can't specify them. So still not ideal but might work in the meantime.

On Apr 16, 2016, 19:05 -0400, Nathan [email protected], wrote:

The ability to specify this in theCargo.tomlsomehow might be nice. One of my crates I'm working on needs all the tests run like this.


You are receiving this because you are subscribed to this thread.
Reply to this email directly orview it on GitHub(#25636 (comment))

@nixpulvis
Copy link

@steveklabnik Oh cool thanks, I'll set that in my project.

jupp0r added a commit to jupp0r/rust that referenced this issue Aug 7, 2016
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.
Manishearth added a commit to Manishearth/rust that referenced this issue 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 added a commit that referenced this issue 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-frontend Area: Compiler frontend (errors, parsing and HIR) C-enhancement Category: An issue proposing an enhancement or a PR with one.
Projects
None yet
Development

No branches or pull requests

4 participants