<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/library/test/src, branch master</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=master</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=master'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2025-09-17T04:56:41+00:00</updated>
<entry>
<title>Rollup merge of #142807 - sourcefrog:failfast, r=dtolnay</title>
<updated>2025-09-17T04:56:41+00:00</updated>
<author>
<name>Stuart Cook</name>
<email>Zalathar@users.noreply.github.com</email>
</author>
<published>2025-09-17T04:56:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=9d93fab3a105024a504fa8797f3431a8c176bad7'/>
<id>urn:sha1:9d93fab3a105024a504fa8797f3431a8c176bad7</id>
<content type='text'>
libtest: expose --fail-fast as an unstable command-line option

This exposes the `fail_fast` option added in rust-lang/rust#105153 on the test harness command line, so that workflows that only want to know if any test fails can find out without waiting for everything to run. For example, cargo-mutants just needs to know if any tests fails. It only works with `-Zunstable-options`.

Tracking issue: rust-lang/rust#142859
</content>
</entry>
<entry>
<title>Deprecate RUST_TEST_* env variables</title>
<updated>2025-08-11T20:06:32+00:00</updated>
<author>
<name>Ed Page</name>
<email>eopage@gmail.com</email>
</author>
<published>2025-08-11T20:06:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=c1a31d81031613a52b509f75ddc8cdf7285cc43a'/>
<id>urn:sha1:c1a31d81031613a52b509f75ddc8cdf7285cc43a</id>
<content type='text'>
This is a documentation-only deprecation for now.
Over time, we can
- warn and then remove on use of unstable environment variables
- warn on use of stable environment variables (no plan to remove due to
  compatibility)

Longer term, we expect test runners, like `cargo test`, to provide the
necessary mechanisms for environmental or persistent configuration (e.g.
using cargo config which supports `.cargo/config.toml` as well as
environment variables).

This would include:
- `RUST_TEST_THREADS`
- `RUST_TEST_NOCAPTURE`
- `RUST_TEST_SHUFFLE` (unstable)
- `RUST_TEST_SHUFFLE_SEED` (unstable)

The primary outcomes for this change are
- Reducing the scope of what is expected for custom test harnesses to
  implement
- Reduce the mechanisms that test runners, like `cargo test`, are
  expected to track when they are being bypassed to protect against
  negative interactions, e.g.  `RUST_TEST_NOCAPTURE=1` when json output
  is being read.</content>
</entry>
<entry>
<title>Add new `test::print_merged_doctests_times` used by rustdoc to display more detailed time information and add new `OutputFormatter::write_merged_doctests_times` method to handle it</title>
<updated>2025-08-04T14:06:56+00:00</updated>
<author>
<name>Guillaume Gomez</name>
<email>guillaume1.gomez@gmail.com</email>
</author>
<published>2025-08-04T14:06:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=75e20afb822e628b66fc4f45d567d3db22c0f82d'/>
<id>urn:sha1:75e20afb822e628b66fc4f45d567d3db22c0f82d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Make `libtest::ERROR_EXIT_CODE` const public to not redefine it in rustdoc</title>
<updated>2025-07-31T08:44:50+00:00</updated>
<author>
<name>Guillaume Gomez</name>
<email>guillaume1.gomez@gmail.com</email>
</author>
<published>2025-07-22T10:03:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=227abb70ab2e3d10f05fe933d3c77ecbb04eb9a9'/>
<id>urn:sha1:227abb70ab2e3d10f05fe933d3c77ecbb04eb9a9</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Make fail-fast unstable</title>
<updated>2025-06-20T20:27:53+00:00</updated>
<author>
<name>Martin Pool</name>
<email>mbp@sourcefrog.net</email>
</author>
<published>2025-06-20T20:27:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=547c72901ad145b40d7271e3ddef2b4ac0c53619'/>
<id>urn:sha1:547c72901ad145b40d7271e3ddef2b4ac0c53619</id>
<content type='text'>
</content>
</entry>
<entry>
<title>libtest: expose --fail-fast</title>
<updated>2025-06-20T20:22:14+00:00</updated>
<author>
<name>Martin Pool</name>
<email>mbp@sourcefrog.net</email>
</author>
<published>2025-06-20T20:18:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=4acf3baecda9c5080bcfdc1ebb4560fbb2a4567e'/>
<id>urn:sha1:4acf3baecda9c5080bcfdc1ebb4560fbb2a4567e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add new `test_main_with_exit_callback` public function in `libtest` to allow a callback to be called before exiting</title>
<updated>2025-05-06T16:17:48+00:00</updated>
<author>
<name>Guillaume Gomez</name>
<email>guillaume1.gomez@gmail.com</email>
</author>
<published>2025-05-06T16:17:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=14782ad6874b768ce208f76a6998e2175ffce755'/>
<id>urn:sha1:14782ad6874b768ce208f76a6998e2175ffce755</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Remove backticks from `ShouldPanic::YesWithMessage`'s `TrFailedMsg`</title>
<updated>2025-04-28T19:40:29+00:00</updated>
<author>
<name>Lieselotte</name>
<email>52315535+she3py@users.noreply.github.com</email>
</author>
<published>2025-04-28T19:40:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=55a419f444378afb5eceb361959fa57eefce2be1'/>
<id>urn:sha1:55a419f444378afb5eceb361959fa57eefce2be1</id>
<content type='text'>
</content>
</entry>
<entry>
<title>fix(test): Expose '--no-capture', deprecating '--nocapture'</title>
<updated>2025-04-17T18:30:59+00:00</updated>
<author>
<name>Ed Page</name>
<email>eopage@gmail.com</email>
</author>
<published>2025-01-27T20:04:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=aa8670f6f81dac097d24277e7559ce5abf5d5183'/>
<id>urn:sha1:aa8670f6f81dac097d24277e7559ce5abf5d5183</id>
<content type='text'>
This improves consistency with commonly expected CLI conventions,
avoiding a common stutter people make when running tests (trying what
they expect and then having to check the docs to then user whats
accepted).

An alternative could have been to take a value, like `--capture &lt;value&gt;` (e.g. `pytest` does this).
Overall, we're shifting focus for features to custom test harnesses (see #134283).
Most of `pytest`s modes will likely be irrelevant in that situation.
As for the rest, its too early to tell which, if any, may be relevant,
so we're sticking with this small, quality of life improvement.

By deprecating `--nocapture`, we intend that custom test harnesses do
not need to support it for reasons outside of their own compatibility
requirements, much like the deprecation in #134283

I'm punting for now on the naming of `RUST_TEST_NOCAPTURE`.
I feel like T-testing-devex should do a wider look at environment
variables role in lib`test` before evaluating whether to
- Deprecate it in favor of the user passing CLI flags or the test runner
  providing its own config
- Deprecate in favor of `RUST_TEST_NO_CAPTURE`
- Deprecate in favor of `RUST_TEST_CAPTURE`

Other CLI flags were evaluated for casing consistency:
- `--logfile` has the same problem but was deprecated in #134283

Fixes #133073
</content>
</entry>
<entry>
<title>refactor(test): Decouple parsing from help generation</title>
<updated>2025-04-17T18:30:59+00:00</updated>
<author>
<name>Ed Page</name>
<email>eopage@gmail.com</email>
</author>
<published>2025-01-27T19:49:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=11f7290c9f9122c5f2c47802c1883b2a0a04aed9'/>
<id>urn:sha1:11f7290c9f9122c5f2c47802c1883b2a0a04aed9</id>
<content type='text'>
This will help with hiding some options in `--help`</content>
</entry>
</feed>
