Rollup merge of #145821 - lolbinarycat:compiletest-error-show, r=clubby789
compiletest: if a compiler fails, show its output Before, when working on something like a `rustdoc-js` test, if you made a syntax error in a rust file, you would not get that error output unless you ran with `--verbose`, which would also cause an enormous amount of other output to be printed as well. This can also lead to frustration in new contributors who don't think to run with `--verbose`. Now, if rustc or rustdoc is run by compiletest and produces an non-zero exit code, its output will be printed.
This commit is contained in:
commit
cf0df7355c
1 changed files with 3 additions and 2 deletions
|
|
@ -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,
|
||||
|
|
@ -2987,6 +2987,7 @@ struct ProcArgs {
|
|||
args: Vec<OsString>,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct ProcRes {
|
||||
status: ExitStatus,
|
||||
stdout: String,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue