Skip to content

Commit b5bdcab

Browse files
committed
fix(lexarg)!: Remove support for RUST_TEST_* env variables
See rust-lang/testing-devex-team#10
1 parent e866742 commit b5bdcab

1 file changed

Lines changed: 3 additions & 21 deletions

File tree

  • crates/libtest-lexarg/src

crates/libtest-lexarg/src/lib.rs

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -159,12 +159,12 @@ tests whose names contain the filter are run. Multiple filter strings may
159159
be passed, which will run all tests matching any of the filters.
160160
161161
By default, all tests are run in parallel. This can be altered with the
162-
--test-threads flag or the RUST_TEST_THREADS environment variable when running
162+
--test-threads flag when running
163163
tests (set it to 1).
164164
165165
All tests have their standard output and standard error captured by default.
166-
This can be overridden with the --nocapture flag or setting RUST_TEST_NOCAPTURE
167-
environment variable to a value other than "0". Logging is not captured by default.
166+
This can be overridden with the --nocapture flag to a value other than "0".
167+
Logging is not captured by default.
168168
169169
Test Attributes:
170170
@@ -308,13 +308,6 @@ impl TestOptsBuilder {
308308
.iter()
309309
.any(|f| f == UNSTABLE_OPTIONS);
310310

311-
if !self.opts.nocapture {
312-
self.opts.nocapture = match std::env::var("RUST_TEST_NOCAPTURE") {
313-
Ok(val) => &val != "0",
314-
Err(_) => false,
315-
};
316-
}
317-
318311
if self.format.is_some() && !allow_unstable_options {
319312
return Err(ErrorContext::msg(
320313
"`--format` requires `-Zunstable-options`",
@@ -339,17 +332,6 @@ impl TestOptsBuilder {
339332
(false, false) => RunIgnored::No,
340333
};
341334

342-
if self.opts.test_threads.is_none() {
343-
if let Ok(value) = std::env::var("RUST_TEST_THREADS") {
344-
self.opts.test_threads =
345-
Some(value.parse::<std::num::NonZeroUsize>().map_err(|_e| {
346-
ErrorContext::msg(format!(
347-
"RUST_TEST_THREADS is `{value}`, should be a positive integer."
348-
))
349-
})?);
350-
}
351-
}
352-
353335
let opts = self.opts;
354336
Ok(opts)
355337
}

0 commit comments

Comments
 (0)