about summary refs log tree commit diff
path: root/src/tools
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-12-03 21:55:30 +0100
committerGitHub <noreply@github.com>2024-12-03 21:55:30 +0100
commitcd56913663fbeb2dbc6a205eed1bb468db90ef30 (patch)
tree51a58879dd7d324e6cb3ac3f15978e9b6f8d3f1a /src/tools
parentfd182ca529ecd9d116848543d119513f836e61ab (diff)
parentab38efefae34f9d69f92f09376eb40482b871de1 (diff)
downloadrust-cd56913663fbeb2dbc6a205eed1bb468db90ef30.tar.gz
rust-cd56913663fbeb2dbc6a205eed1bb468db90ef30.zip
Rollup merge of #133813 - clubby789:ui-pass-note, r=jieyouxu
compiletest: explain that UI tests are expected not to compile by default

```
error: ui test compiled successfully!
```
is not a very useful message for someone new to the test suite, so change the wording and add a note to explain
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/compiletest/src/runtest.rs11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs
index 7be9e2f2d57..84269fd44a1 100644
--- a/src/tools/compiletest/src/runtest.rs
+++ b/src/tools/compiletest/src/runtest.rs
@@ -350,10 +350,13 @@ impl<'test> TestCx<'test> {
             }
         } else {
             if proc_res.status.success() {
-                self.fatal_proc_rec(
-                    &format!("{} test compiled successfully!", self.config.mode)[..],
-                    proc_res,
-                );
+                {
+                    self.error(&format!("{} test did not emit an error", self.config.mode));
+                    if self.config.mode == crate::common::Mode::Ui {
+                        println!("note: by default, ui tests are expected not to compile");
+                    }
+                    proc_res.fatal(None, || ());
+                };
             }
 
             if !self.props.dont_check_failure_status {