From 6338574bc5c036487486acde264f38f39ea15fad Mon Sep 17 00:00:00 2001 From: En-En <39373446+En-En-Code@users.noreply.github.com> Date: Sun, 9 Nov 2025 16:11:44 +0000 Subject: [PATCH] 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. --- .cargo/config.toml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .cargo/config.toml diff --git a/.cargo/config.toml b/.cargo/config.toml new file mode 100644 index 0000000..8af59dd --- /dev/null +++ b/.cargo/config.toml @@ -0,0 +1,2 @@ +[env] +RUST_TEST_THREADS = "1"