@@ -129,28 +129,6 @@ Options:
129129 --show-output Show captured stdout of successful tests
130130 -Z unstable-options Enable nightly-only flags:
131131 unstable-options = Allow use of experimental features
132- --report-time Show execution time of each test.
133- Threshold values for colorized output can be
134- configured via
135- `RUST_TEST_TIME_UNIT`, `RUST_TEST_TIME_INTEGRATION`
136- and
137- `RUST_TEST_TIME_DOCTEST` environment variables.
138- Expected format of environment variable is
139- `VARIABLE=WARN_TIME,CRITICAL_TIME`.
140- Durations must be specified in milliseconds, e.g.
141- `500,2000` means that the warn time
142- is 0.5 seconds, and the critical time is 2 seconds.
143- Not available for --format=terse
144- --ensure-time Treat excess of the test execution time limit as
145- error.
146- Threshold values for this option can be configured via
147- `RUST_TEST_TIME_UNIT`, `RUST_TEST_TIME_INTEGRATION`
148- and
149- `RUST_TEST_TIME_DOCTEST` environment variables.
150- Expected format of environment variable is
151- `VARIABLE=WARN_TIME,CRITICAL_TIME`.
152- `CRITICAL_TIME` here means the limit that should not
153- be exceeded by test.
154132"# ;
155133
156134pub const AFTER_HELP : & str = r#"
@@ -159,12 +137,12 @@ tests whose names contain the filter are run. Multiple filter strings may
159137be passed, which will run all tests matching any of the filters.
160138
161139By 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
140+ --test-threads flag when running
163141tests (set it to 1).
164142
165143All 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.
144+ This can be overridden with the --nocapture flag to a value other than "0".
145+ Logging is not captured by default.
168146
169147Test Attributes:
170148
@@ -308,13 +286,6 @@ impl TestOptsBuilder {
308286 . iter ( )
309287 . any ( |f| f == UNSTABLE_OPTIONS ) ;
310288
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-
318289 if self . format . is_some ( ) && !allow_unstable_options {
319290 return Err ( ErrorContext :: msg (
320291 "`--format` requires `-Zunstable-options`" ,
@@ -339,17 +310,6 @@ impl TestOptsBuilder {
339310 ( false , false ) => RunIgnored :: No ,
340311 } ;
341312
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-
353313 let opts = self . opts ;
354314 Ok ( opts)
355315 }
0 commit comments