Rollup merge of #111826 - ehuss:bootstrap-test-render-message, r=clubby789

Render test messages from bootstrap

Bootstrap was not rendering messages from the test harness when a test failed. This can include messages like "test did not panic as expected". This fixes it by making sure those messages are printed on failure.

Fixes #111825
This commit is contained in:
Matthias Krüger 2023-05-22 06:54:17 +02:00 committed by GitHub
commit e2362d7e1a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -168,9 +168,14 @@ fn render_suite_outcome(&self, outcome: Outcome<'_>, suite: &SuiteOutcome) {
if !self.failures.is_empty() {
println!("\nfailures:\n");
for failure in &self.failures {
if let Some(stdout) = &failure.stdout {
if failure.stdout.is_some() || failure.message.is_some() {
println!("---- {} stdout ----", failure.name);
println!("{stdout}");
if let Some(stdout) = &failure.stdout {
println!("{stdout}");
}
if let Some(message) = &failure.message {
println!("note: {message}");
}
}
}