about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-07-08 16:12:28 +0000
committerbors <bors@rust-lang.org>2023-07-08 16:12:28 +0000
commit4353b1ecd65d493c9f503aacff07a3f98d0b0340 (patch)
tree95dbb52cdc1e7eaeb0a0ba3b74c37c0fb26a9db4
parent9bb6fbe26198e58b517bfbf58a3348fad98d1654 (diff)
parentd8c29b82c9732087881da93a429431e5f2da346d (diff)
downloadrust-4353b1ecd65d493c9f503aacff07a3f98d0b0340.tar.gz
rust-4353b1ecd65d493c9f503aacff07a3f98d0b0340.zip
Auto merge of #113450 - Nilstrieb:src/bootstrap/test.rs, r=flip1995
Fail the build if clippy tests don't pass

This was removed in
https://github.com/rust-lang/rust/pull/113260/commits/de69d556eb5006a21f868b8c12d48f0ef1308a5a#diff-8479eab02701e686aedb15b567dc8fc31220c6e4efb9565ccc9d662b7fee2214 which caused CI to ignore clippy failures. This adds back the exit, which should cause CI to fail again if a test is broken (like right now, as clippy tests are broken on master).

Also see https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/CI.20doesn't.20care.20about.20clippy.20test.20failures.20but.20only.20sometime

r? flip1995
-rw-r--r--src/bootstrap/test.rs4
-rw-r--r--src/tools/clippy/tests/ui/to_string_in_format_args_incremental.rs9
-rw-r--r--src/tools/clippy/tests/ui/to_string_in_format_args_incremental.stderr10
3 files changed, 4 insertions, 19 deletions
diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs
index e4cc88c64a5..eed7a584b60 100644
--- a/src/bootstrap/test.rs
+++ b/src/bootstrap/test.rs
@@ -799,6 +799,10 @@ impl Step for Clippy {
             // The tests succeeded; nothing to do.
             return;
         }
+
+        if !builder.config.cmd.bless() {
+            crate::detail_exit_macro!(1);
+        }
     }
 }
 
diff --git a/src/tools/clippy/tests/ui/to_string_in_format_args_incremental.rs b/src/tools/clippy/tests/ui/to_string_in_format_args_incremental.rs
deleted file mode 100644
index 67115f7c5a7..00000000000
--- a/src/tools/clippy/tests/ui/to_string_in_format_args_incremental.rs
+++ /dev/null
@@ -1,9 +0,0 @@
-//@run-rustfix
-//@compile-flags: -C incremental=target/debug/test/incr
-
-// see https://github.com/rust-lang/rust-clippy/issues/10969
-
-fn main() {
-    let s = "Hello, world!";
-    println!("{}", s.to_string());
-}
diff --git a/src/tools/clippy/tests/ui/to_string_in_format_args_incremental.stderr b/src/tools/clippy/tests/ui/to_string_in_format_args_incremental.stderr
deleted file mode 100644
index a992c542914..00000000000
--- a/src/tools/clippy/tests/ui/to_string_in_format_args_incremental.stderr
+++ /dev/null
@@ -1,10 +0,0 @@
-error: `to_string` applied to a type that implements `Display` in `println!` args
-  --> $DIR/to_string_in_format_args_incremental.rs:8:21
-   |
-LL |     println!("{}", s.to_string());
-   |                     ^^^^^^^^^^^^ help: remove this
-   |
-   = note: `-D clippy::to-string-in-format-args` implied by `-D warnings`
-
-error: aborting due to previous error
-