summaryrefslogtreecommitdiffstats
path: root/src/bootstrap/render_tests.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 02:49:50 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 02:49:50 +0000
commit9835e2ae736235810b4ea1c162ca5e65c547e770 (patch)
tree3fcebf40ed70e581d776a8a4c65923e8ec20e026 /src/bootstrap/render_tests.rs
parentReleasing progress-linux version 1.70.0+dfsg2-1~progress7.99u1. (diff)
downloadrustc-9835e2ae736235810b4ea1c162ca5e65c547e770.tar.xz
rustc-9835e2ae736235810b4ea1c162ca5e65c547e770.zip
Merging upstream version 1.71.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/bootstrap/render_tests.rs')
-rw-r--r--src/bootstrap/render_tests.rs12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/bootstrap/render_tests.rs b/src/bootstrap/render_tests.rs
index 19019ad2c..fa0a48066 100644
--- a/src/bootstrap/render_tests.rs
+++ b/src/bootstrap/render_tests.rs
@@ -1,7 +1,7 @@
//! This module renders the JSON output of libtest into a human-readable form, trying to be as
//! similar to libtest's native output as possible.
//!
-//! This is needed because we need to use libtest in JSON mode to extract granluar information
+//! This is needed because we need to use libtest in JSON mode to extract granular information
//! about the executed tests. Doing so suppresses the human-readable output, and (compared to Cargo
//! and rustc) libtest doesn't include the rendered human-readable output as a JSON field. We had
//! to reimplement all the rendering logic in this module because of that.
@@ -124,6 +124,7 @@ impl<'a> Renderer<'a> {
ignore_reason: reason.map(|s| s.to_string()),
},
},
+ self.builder,
);
if self.builder.config.verbose_tests {
@@ -167,9 +168,14 @@ impl<'a> Renderer<'a> {
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}");
+ }
}
}