Skip to content

--message-format= should also imply a corresponding flag to test harnesses #8903

Open
@nagisa

Description

@nagisa

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 #5609 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-json-outputArea: JSON message outputC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Command-testS-needs-designStatus: Needs someone to work further on the design for the feature or fix. NOT YET accepted.

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions