From 9567812592d435a7160071081d150b8146ca4625 Mon Sep 17 00:00:00 2001 From: binarycat Date: Sun, 24 Aug 2025 10:00:59 -0500 Subject: [PATCH] compiletest: if a compiler fails outside a ui test, show its output --- src/tools/compiletest/src/runtest.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs index 2402ed9a950f2..7da7bcd597d15 100644 --- a/src/tools/compiletest/src/runtest.rs +++ b/src/tools/compiletest/src/runtest.rs @@ -412,7 +412,7 @@ impl<'test> TestCx<'test> { cmdline: format!("{cmd:?}"), }; self.dump_output( - self.config.verbose, + self.config.verbose || !proc_res.status.success(), &cmd.get_program().to_string_lossy(), &proc_res.stdout, &proc_res.stderr, @@ -1486,7 +1486,7 @@ impl<'test> TestCx<'test> { }; self.dump_output( - self.config.verbose, + self.config.verbose || (!result.status.success() && self.config.mode != TestMode::Ui), &command.get_program().to_string_lossy(), &result.stdout, &result.stderr, @@ -2983,6 +2983,7 @@ struct ProcArgs { args: Vec, } +#[derive(Debug)] pub struct ProcRes { status: ExitStatus, stdout: String,