You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
compiletest --nocapture still delays prints #128565
This occurs because the output of the child(executor) process in which the test runs is piped to parent (compiletest) process. So it's output cannot be read and printed till the process is complete. (in src/tools/compiletest/src/runtest/run_make.rs).
let mut cmd = Command::new(&recipe_bin);
cmd.current_dir(&rmake_out_dir)
.stdout(Stdio::piped())
.stderr(Stdio::piped())
But this is not required in the case where we want to run a test with --no-capture.
So a fix would be to use Stdio:inherit() and not reading the stdout of the executor process using self.read2_abbreviated(proc); when using the --no-capture flag .
if self.config.capture {
cmd.stdout(Stdio::piped()).stderr(Stdio::piped());
} else {
cmd.stdout(Stdio::inherit()).stderr(Stdio::inherit());
}
Activity
Ashutosh1910 commentedon Sep 3, 2026
@rustbot claim
Ashutosh1910 commentedon Sep 12, 2026
src/tools/compiletest/src/runtest/run_make.rs).--no-capture.Stdio:inherit()and not reading the stdout of the executor process usingself.read2_abbreviated(proc);when using the--no-captureflag .Rollup merge of rust-lang#162714 - Ashutosh1910:fix_compiletest_issue…
Unrolled build for #162714 in rollup 163404
Rollup merge of rust-lang#163989 - jieyouxu:revert-stream-output, r=lqd
Rollup merge of rust-lang#163989 - jieyouxu:revert-stream-output, r=lqd
Unrolled build for #163989 in rollup 164005
Rollup merge of #163989 - jieyouxu:revert-stream-output, r=lqd