--quiet
propagation is unavailable to custom test harnesses
#15465
Labels
A-cli
Area: Command-line interface, option parsing, etc.
C-enhancement
Category: enhancement
Command-test
S-needs-rfc
Status: Needs an RFC to make progress.
Currently, Cargo will forward the
--quiet
option from its command line to test binaries. However, it does not do this whenharness = false
.cargo/src/cargo/ops/cargo_test.rs
Lines 383 to 385 in 4a7e881
This means that test targets with custom test harnesses cannot replicate the automatic coordination the rustc test harness gets. Given the stated plans to promote custom test harnesses over adding more features to libtest, I believe this behavior needs to be revised.
I think it is likely that the correct solution here is to add some larger API for more structured, extensible communication between cargo and a custom test harness, rather than changing what individual args are sent. Still, I’m filing this issue to make sure this is considered and to document the quirk for anyone else who is writing a libtest-compatible harness and debugging why their output stays verbose.
@rustbot label +Command-test +A-cli
The text was updated successfully, but these errors were encountered: