Open
Description
we should teach bootstrap to respect --show-output
, which in normal libtest prints the output at the end:
; c t --lib -- --show-output
warning: `[project]` is deprecated in favor of `[package]`
Finished `test` profile [unoptimized + debuginfo] target(s) in 0.01s
Running unittests src/lib.rs (/home/jyn/.local/lib/cargo/target/debug/deps/example-d78220620848f9e6)
running 2 tests
test bar ... ok
test foo ... ok
successes:
---- bar stdout ----
jieyouxu
---- foo stdout ----
hi
successes:
bar
foo
test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
right now compiletest only supports --nocapture
, which doesn't buffer output at all and as a result ends up interleaved with libtest's own progress reporting.
note this is non-trivial because bootstrap reimplements its own formatter for the json output:
rust/src/bootstrap/src/utils/render_tests.rs
Line 214 in 2a71007
Originally posted by @jyn514 in #134111 (comment)