-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
libtest should set RUST_TEST_THREADS environment variable #74845
Copy link
Copy link
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.S-waiting-on-authorStatus: This is awaiting some action (such as code changes or more information) from the author.Status: This is awaiting some action (such as code changes or more information) from the author.
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.S-waiting-on-authorStatus: This is awaiting some action (such as code changes or more information) from the author.Status: This is awaiting some action (such as code changes or more information) from the author.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Projects
Status
No status
We can configure the test runner concurrency by using either the
--test-threadsparameter, or by setting the environment variableRUST_TEST_THREADS:rust/src/libtest/lib.rs
Line 245 in efc02b0
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.: