Skip to content

--format=junit doesn't include stdout / test failure reason #110336

Closed
@ssbr

Description

@ssbr

I tried this code:

#[test]
fn it_breaks() { panic!("PANICCC"); }

I expected to see this happen: the string PANICCC in the test output, when running cargo test -- --format=junit -Zunstable-options.

Instead, this happened:

<?xml version="1.0" encoding="UTF-8"?><testsuites><testsuite name="test" package="test" id="0" errors="0" failures="1" tests="1" skipped="0" ><testcase classname="crate" name="it_breaks" time="0"><failure type="assert"/></testcase><system-out/><system-err/></testsuite></testsuites>

Meta

rustc --version --verbose:

rustc 1.68.2 (9eb3afe9e 2023-03-27)
binary: rustc
commit-hash: 9eb3afe9ebe9c7d2b84b71002d44f4a0edac95e0
commit-date: 2023-03-27
host: x86_64-unknown-linux-gnu
release: 1.68.2
LLVM version: 15.0.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-libtestArea: `#[test]` / the `test` libraryC-bugCategory: This is a bug.T-libsRelevant to the library team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions