--message-format= should also imply a corresponding flag to test harnesses
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 15.5k
- Forks
- 3k
- Avg merge
- 23h 30m
- Merged PRs (30d)
- 51
Description
Describe the problem you are trying to solve
I currently invoke cargo with --message-format=json in order to parse its output and present it to development/review tooling as in-line messages. Cargo currently does not support presenting the test output in a different way. In order to obtain machine-readable output from tests, I need to build the tests with --no-run, collect the test artifacts, and run them manually, while passing --format=json to the harnesses and parse that output, instead.
Describe the solution you'd like
Running with --message-format= should output test progress, status and similar information as the requested message format.
Notes
This would also enable some progress towards #5609. See also https://github.com/rust-lang/cargo/issues/5609#issuecomment-734396116
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how cargo test handles --message-format and invokes test harnesses, then read the discussion linked from #5609. The change is complete when test progress and status use the requested message format without requiring --no-run or manual harness execution, with coverage for the supported formats.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100