diff options
| author | Jakub Beránek <berykubik@gmail.com> | 2025-07-02 09:04:09 +0200 |
|---|---|---|
| committer | Jakub Beránek <berykubik@gmail.com> | 2025-07-02 09:12:37 +0200 |
| commit | a7c625146e368a90b14de25b7c15a92b10040817 (patch) | |
| tree | 3ae671dbcc1cc57ccfdf1b3d5d11a17aed1aa99a /src | |
| parent | 4dfa59dcfb60f2250ceff511f39a5cbcd2a06bb4 (diff) | |
Add compiletest check tests
Diffstat (limited to 'src')
| -rw-r--r-- | src/bootstrap/src/core/build_steps/check.rs | 4 | ||||
| -rw-r--r-- | src/bootstrap/src/core/builder/tests.rs | 30 |
2 files changed, 30 insertions, 4 deletions
diff --git a/src/bootstrap/src/core/build_steps/check.rs b/src/bootstrap/src/core/build_steps/check.rs index 23cc2ae3326..f62f17561ab 100644 --- a/src/bootstrap/src/core/build_steps/check.rs +++ b/src/bootstrap/src/core/build_steps/check.rs @@ -440,6 +440,10 @@ impl Step for Compiletest { let _guard = builder.msg_check("compiletest artifacts", self.target, None); run_cargo(builder, cargo, builder.config.free_args.clone(), &stamp, vec![], true, false); } + + fn metadata(&self) -> Option<StepMetadata> { + Some(StepMetadata::check("compiletest", self.target)) + } } macro_rules! tool_check_step { diff --git a/src/bootstrap/src/core/builder/tests.rs b/src/bootstrap/src/core/builder/tests.rs index 662c1945148..924025eea3e 100644 --- a/src/bootstrap/src/core/builder/tests.rs +++ b/src/bootstrap/src/core/builder/tests.rs @@ -1249,13 +1249,13 @@ mod snapshot { ctx.config("check") .path("rustc") .render_steps(), @r" + [check] std <host> [build] llvm <host> - [check] rustc 0 <host> -> rustc 1 <host> + [check] rustc <host> "); } #[test] - #[should_panic] fn check_compiler_stage_0() { let ctx = TestCtx::new(); ctx.config("check").path("compiler").stage(0).run(); @@ -1307,7 +1307,6 @@ mod snapshot { } #[test] - #[should_panic] fn check_library_stage_0() { let ctx = TestCtx::new(); ctx.config("check").path("library").stage(0).run(); @@ -1358,7 +1357,6 @@ mod snapshot { } #[test] - #[should_panic] fn check_miri_stage_0() { let ctx = TestCtx::new(); ctx.config("check").path("miri").stage(0).run(); @@ -1399,6 +1397,30 @@ mod snapshot { } #[test] + fn check_compiletest() { + let ctx = TestCtx::new(); + insta::assert_snapshot!( + ctx.config("check") + .path("compiletest") + .render_steps(), @"[check] compiletest <host>"); + } + + #[test] + fn check_compiletest_stage1_libtest() { + let ctx = TestCtx::new(); + insta::assert_snapshot!( + ctx.config("check") + .path("compiletest") + .args(&["--set", "build.compiletest-use-stage0-libtest=false"]) + .render_steps(), @r" + [check] std <host> + [build] llvm <host> + [check] rustc <host> + [check] compiletest <host> + "); + } + + #[test] fn test_exclude() { let ctx = TestCtx::new(); let steps = ctx.config("test").args(&["--skip", "src/tools/tidy"]).get_steps(); |
