tests: preset RUST_TEST_THREADS to 1

Since running the tests using all available threads is inconsistent, set
the default number of test threads to be 1. This can be overridden with
another use of the environment variable or with the `--test-threads`
flag. This improves packages which use `cargo test` as part of the build
process with no changes needeed from the packagers' side.

`RUST_TEST_THREADS` is documented as deprecated, but cannot be removed
by Cargo before a way to specify Cargo test flags becomes available.
This commit is contained in:
En-En 2025-11-09 16:11:44 +00:00 committed by Supreeeme
parent 273ce6aa5d
commit 6338574bc5

2
.cargo/config.toml Normal file
View file

@ -0,0 +1,2 @@
[env]
RUST_TEST_THREADS = "1"