compiletest: don't use `std::io::stdout()`, as it bypasses `set_print`. by eddyb · Pull Request #70662 · rust-lang/rust

@eddyb

@eddyb eddyb mentioned this pull request

Apr 1, 2020

@bors bors added S-waiting-on-bors

Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

and removed S-waiting-on-review

Status: Awaiting review from the assignee but also interested parties.

labels

Apr 1, 2020

Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request

Apr 1, 2020
…k-Simulacrum

compiletest: don't use `std::io::stdout()`, as it bypasses `set_print`.

This PR undoes a change made during rust-lang#69916, which became unnecessary during review but was left in by accident, and which isn't correct due to `libtest` using `std::io::set_print`, which overwrites the `println!` behavior but *not* `writeln!(std::io::stdout(), ...)`.

The effect of using `writeln!(std::io::stdout(), ...)` was that the diff output would show *while* running the tests, instead of at the end, when failing tests are listed.

r? @Mark-Simulacrum cc @oli-obk

This was referenced

Apr 1, 2020

bors added a commit to rust-lang-ci/rust that referenced this pull request

Apr 1, 2020
Rollup of 6 pull requests

Successful merges:

 - rust-lang#70535 (Track the finalizing node in the specialization graph)
 - rust-lang#70590 (Miri: make backtrace function names and spans match up)
 - rust-lang#70616 (rustc_target::abi: rename FieldPlacement to FieldsShape.)
 - rust-lang#70626 (cargotest: remove webrender)
 - rust-lang#70649 (clean up E0468 explanation)
 - rust-lang#70662 (compiletest: don't use `std::io::stdout()`, as it bypasses `set_print`.)

Failed merges:

r? @ghost

@eddyb eddyb deleted the compiletest-stdout-fix branch

April 2, 2020 06:40