-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
A-libtestArea: `#[test]` / the `test` libraryArea: `#[test]` / the `test` libraryC-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.
Description
We can configure the test runner concurrency by using either the --test-threads
parameter, or by setting the environment variable RUST_TEST_THREADS
:
Line 245 in efc02b0
let concurrency = opts.test_threads.unwrap_or_else(get_concurrency); |
As some tests might need to read the current concurrency configuration, the only way to do this currently is by reading the said environment variable. However, if we use --test-threads
, this information is not passed further to tests. I think this behaviour is a bit inconsistent and the env var should be always set to the actual value, e.g.:
let concurrency = opts.test_threads.unwrap_or_else(get_concurrency);
env::set_var("RUST_TEST_THREADS", concurrency.to_string());
Metadata
Metadata
Assignees
Labels
A-libtestArea: `#[test]` / the `test` libraryArea: `#[test]` / the `test` libraryC-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.
Type
Projects
Status
No status