]> git.lizzy.rs Git - rust.git/blobdiff - library/test/src/formatters/terse.rs
Auto merge of #107443 - cjgillot:generator-less-query, r=compiler-errors
[rust.git] / library / test / src / formatters / terse.rs
index 0837ab16905130c18cd6c5086af909075c3d8feb..a431acfbc27538944219c626f48e10a0e7b0ec72 100644 (file)
@@ -254,6 +254,15 @@ fn write_run_finish(&mut self, state: &ConsoleTestState) -> io::Result<bool> {
 
         self.write_plain("\n\n")?;
 
+        // Custom handling of cases where there is only 1 test to execute and that test was ignored.
+        // We want to show more detailed information(why was the test ignored) for investigation purposes.
+        if self.total_test_count == 1 && state.ignores.len() == 1 {
+            let test_desc = &state.ignores[0].0;
+            if let Some(im) = test_desc.ignore_message {
+                self.write_plain(format!("test: {}, ignore_message: {}\n\n", test_desc.name, im))?;
+            }
+        }
+
         Ok(success)
     }
 }