Auto merge of #46450 - Gilnaa:libtest_json_output, r=nrc
Libtest json output A revisit to my [last PR](https://github.com/rust-lang/rust/pull/45923). Events are now more atomic, printed in a flat hierarchy. For the normal test output: ``` running 1 test test f ... FAILED failures: ---- f stdout ---- thread 'f' panicked at 'assertion failed: `(left == right)` left: `3`, right: `4`', f.rs:3:1 note: Run with `RUST_BACKTRACE=1` for a backtrace. failures: f test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out ``` The JSON equivalent is: ``` { "type": "suite", "event": "started", "test_count": "1" } { "type": "test", "event": "started", "name": "f" } { "type": "test", "event": "failed", "name": "f" } { "type": "suite", "event": "failed", "passed": 0, "failed": 1, "allowed_fail": 0, "ignored": 0, "measured": 0, "filtered_out": "0" } { "type": "test_output", "name": "f", "output": "thread 'f' panicked at 'assertion failed: `(left == right)` left: `3`, right: `4`', f.rs:3:1 note: Run with `RUST_BACKTRACE=1` for a backtrace. " } ```
Showing
src/libtest/formatters/json.rs
0 → 100644
src/libtest/formatters/mod.rs
0 → 100644
src/libtest/formatters/pretty.rs
0 → 100644
src/libtest/formatters/terse.rs
0 → 100644
此差异已折叠。
想要评论请 注册 或 登录