Skip to content

Commit 9567812

Browse files
committed
compiletest: if a compiler fails outside a ui test, show its output
1 parent 6ba0ce4 commit 9567812

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/tools/compiletest/src/runtest.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ impl<'test> TestCx<'test> {
412412
cmdline: format!("{cmd:?}"),
413413
};
414414
self.dump_output(
415-
self.config.verbose,
415+
self.config.verbose || !proc_res.status.success(),
416416
&cmd.get_program().to_string_lossy(),
417417
&proc_res.stdout,
418418
&proc_res.stderr,
@@ -1486,7 +1486,7 @@ impl<'test> TestCx<'test> {
14861486
};
14871487

14881488
self.dump_output(
1489-
self.config.verbose,
1489+
self.config.verbose || (!result.status.success() && self.config.mode != TestMode::Ui),
14901490
&command.get_program().to_string_lossy(),
14911491
&result.stdout,
14921492
&result.stderr,
@@ -2983,6 +2983,7 @@ struct ProcArgs {
29832983
args: Vec<OsString>,
29842984
}
29852985

2986+
#[derive(Debug)]
29862987
pub struct ProcRes {
29872988
status: ExitStatus,
29882989
stdout: String,

0 commit comments

Comments
 (0)