<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/library/test/src/cli.rs, branch 1.89.0</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.89.0</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.89.0'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2025-04-17T18:30:59+00:00</updated>
<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>
<entry>
<title>fix(libtest): Deprecate '--logfile'</title>
<updated>2025-01-24T21:34:18+00:00</updated>
<author>
<name>Ed Page</name>
<email>eopage@gmail.com</email>
</author>
<published>2024-12-13T20:49:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=2444adf27c3c4e638c121b685bc3d4d57bb9d51f'/>
<id>urn:sha1:2444adf27c3c4e638c121b685bc3d4d57bb9d51f</id>
<content type='text'>
rust-lang/testing-devex-team#9 proposed changing the behavior of `--logfile`.
The given reasons were:

(1) Bazel can't programmatically process stdout.  This seems like a
limitation in Bazel and we recommend focusing on that.  If we look at
the wider Rust ecosystem, Rustc and Cargo don't support any such
mechanism and the Cargo team rejected having one.  Expecting this in
libtest when its not supported elsewhere seems too specialized.

(2) Tests that leak out non-programmatic output that intermixes with
programmatic output.  We acknowledge this is a problem to be evaluated
but we need to make sure we are stepping back and gathering
requirements, rather than assuming `--logfile` will fit the needs.

Independent of the motive, regarding using or changing  `--logfile`

(1) Most ways to do it would be a breaking change, like if we respect
any stable `--format`.  As suggested above, we could specialize this to
new `--format` values but that would be confusing for some values to
apply but not others.

(2) Other ways of solving this add new features to lib`test` when we are
instead wanting to limit the feature set it has to minimize the
compatibility surface that has to be maintained and the burden it would
put on third party harnesses which are a focus area.  Examples include
`--format compact` or a `--log-format` flag

(3) The existence of `--logfile` dates back quite a ways
(https://github.com/rust-lang/rust/commit/5cc050b265509c19717e11e12dd785d8c73f5b11,
rust-lang/rust#2127) and the history gives the
impression this more of slipped through rather than being an intended
feature (see also
https://github.com/rust-lang/rust/pull/82350#discussion_r579732071).
Deprecation would better match to how it has been treated.
By deprecating this, we do not expect custom test harnesses
(rust-lang/testing-devex-team#2) to implement this.

T-testing-devex held an FCP for deprecating in rust-lang/testing-devex-team#9
though according to
[RFC #3455](https://rust-lang.github.io/rfcs/3455-t-test.html),
this is still subject to final approval from T-libs-api.
</content>
</entry>
<entry>
<title>test: add `#![warn(unreachable_pub)]`</title>
<updated>2025-01-20T17:46:29+00:00</updated>
<author>
<name>Urgau</name>
<email>urgau@numericable.fr</email>
</author>
<published>2025-01-09T21:57:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=939b7047a0495e461efa57fed828fedd06b1cdb4'/>
<id>urn:sha1:939b7047a0495e461efa57fed828fedd06b1cdb4</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Reformat `use` declarations.</title>
<updated>2024-07-28T22:26:52+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2024-07-28T22:13:50+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=84ac80f1921afc243d71fd0caaa4f2838c294102'/>
<id>urn:sha1:84ac80f1921afc243d71fd0caaa4f2838c294102</id>
<content type='text'>
The previous commit updated `rustfmt.toml` appropriately. This commit is
the outcome of running `x fmt --all` with the new formatting options.
</content>
</entry>
<entry>
<title>Apply x clippy --fix and x fmt</title>
<updated>2024-05-30T01:51:27+00:00</updated>
<author>
<name>r0cky</name>
<email>mu001999@outlook.com</email>
</author>
<published>2024-05-30T01:51:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=dabd05bbab9df465a580858c3e03dc1797b12deb'/>
<id>urn:sha1:dabd05bbab9df465a580858c3e03dc1797b12deb</id>
<content type='text'>
</content>
</entry>
<entry>
<title>libtest: Improve error when missing `-Zunstable-options`</title>
<updated>2023-05-24T16:18:20+00:00</updated>
<author>
<name>jyn</name>
<email>jyn.nelson@redjack.com</email>
</author>
<published>2023-05-24T15:42:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=9314ed0cbd1cda2df6c14b7d657db9aceb1b39a5'/>
<id>urn:sha1:9314ed0cbd1cda2df6c14b7d657db9aceb1b39a5</id>
<content type='text'>
"only accepted on the nightly compiler" is misleading when this *is* nightly.
</content>
</entry>
<entry>
<title>Allow setting CFG_DISABLE_UNSTABLE_FEATURES to 0</title>
<updated>2023-01-12T10:36:04+00:00</updated>
<author>
<name>Collin Baker</name>
<email>collinbaker@chromium.org</email>
</author>
<published>2023-01-12T10:36:04+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=0a03d1c9cafde0ada19b4fab0f3d6892cb154fd8'/>
<id>urn:sha1:0a03d1c9cafde0ada19b4fab0f3d6892cb154fd8</id>
<content type='text'>
Two locations check whether this build-time environment variable is
defined. Allowing it to be explicitly disabled with a "0" value is
useful, especially for integrating with external build systems.
</content>
</entry>
<entry>
<title>Fix `uninlined_format_args` in libtest</title>
<updated>2022-12-19T07:58:40+00:00</updated>
<author>
<name>nils</name>
<email>48135649+Nilstrieb@users.noreply.github.com</email>
</author>
<published>2022-12-19T07:48:30+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=5fb2d63d0793a4c3c612d1e4a4ca6a184e6fe614'/>
<id>urn:sha1:5fb2d63d0793a4c3c612d1e4a4ca6a184e6fe614</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Create a hacky fail-fast mode that stops tests at the first failure</title>
<updated>2022-12-01T20:29:18+00:00</updated>
<author>
<name>Oli Scherer</name>
<email>git-spam-no-reply9815368754983@oli-obk.de</email>
</author>
<published>2022-12-01T19:58:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=e59025867da9032ecacc36987b207a8a1e531fee'/>
<id>urn:sha1:e59025867da9032ecacc36987b207a8a1e531fee</id>
<content type='text'>
</content>
</entry>
</feed>
