diff options
| -rw-r--r-- | src/bootstrap/src/core/build_steps/clippy.rs | 12 | ||||
| -rw-r--r-- | src/bootstrap/src/core/builder/tests.rs | 45 |
2 files changed, 57 insertions, 0 deletions
diff --git a/src/bootstrap/src/core/build_steps/clippy.rs b/src/bootstrap/src/core/build_steps/clippy.rs index 7ec6649aefb..f029f9fa939 100644 --- a/src/bootstrap/src/core/build_steps/clippy.rs +++ b/src/bootstrap/src/core/build_steps/clippy.rs @@ -178,6 +178,10 @@ impl Step for Std { false, ); } + + fn metadata(&self) -> Option<StepMetadata> { + Some(StepMetadata::clippy("std", self.target)) + } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] @@ -261,6 +265,10 @@ impl Step for Rustc { false, ); } + + fn metadata(&self) -> Option<StepMetadata> { + Some(StepMetadata::clippy("rustc", self.target)) + } } #[derive(Debug, Clone, Hash, PartialEq, Eq)] @@ -404,6 +412,10 @@ macro_rules! lint_any { false, ); } + + fn metadata(&self) -> Option<StepMetadata> { + Some(StepMetadata::clippy($readable_name, self.target)) + } } )+ } diff --git a/src/bootstrap/src/core/builder/tests.rs b/src/bootstrap/src/core/builder/tests.rs index 32d191c4265..b9fc3ed57ec 100644 --- a/src/bootstrap/src/core/builder/tests.rs +++ b/src/bootstrap/src/core/builder/tests.rs @@ -2065,6 +2065,51 @@ mod snapshot { [doc] rustc 1 <host> -> reference (book) 2 <host> "); } + + #[test] + fn clippy_ci() { + let ctx = TestCtx::new(); + insta::assert_snapshot!( + ctx.config("clippy") + .path("ci") + .render_steps(), @r" + [build] llvm <host> + [build] rustc 0 <host> -> rustc 1 <host> + [check] rustc 1 <host> -> rustc 2 <host> + [build] rustc 0 <host> -> clippy-driver 1 <host> + [build] rustc 0 <host> -> cargo-clippy 1 <host> + [clippy] bootstrap <host> + [clippy] std <host> + [build] rustc 1 <host> -> std 1 <host> + [clippy] rustc <host> + [clippy] rustc 0 <host> -> rustc_codegen_gcc 1 <host> + "); + } + + #[test] + fn clippy_ci_stage_2() { + let ctx = TestCtx::new(); + insta::assert_snapshot!( + ctx.config("clippy") + .path("ci") + .stage(2) + .render_steps(), @r" + [build] llvm <host> + [build] rustc 0 <host> -> rustc 1 <host> + [build] rustc 1 <host> -> std 1 <host> + [build] rustc 1 <host> -> rustc 2 <host> + [check] rustc 2 <host> -> rustc 3 <host> + [build] rustc 1 <host> -> clippy-driver 2 <host> + [build] rustc 1 <host> -> cargo-clippy 2 <host> + [clippy] bootstrap <host> + [clippy] std <host> + [build] rustc 2 <host> -> std 2 <host> + [clippy] rustc <host> + [build] rustc 0 <host> -> clippy-driver 1 <host> + [build] rustc 0 <host> -> cargo-clippy 1 <host> + [clippy] rustc 1 <host> -> rustc_codegen_gcc 2 <host> + "); + } } struct ExecutedSteps { |
