about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJakub Beránek <berykubik@gmail.com>2025-08-27 11:35:10 +0200
committerJakub Beránek <berykubik@gmail.com>2025-08-30 15:28:41 +0200
commitd2195c483c2c0593b1b6cde7a9f4097ec9c17c10 (patch)
treea5e4bce579e9e101e6da4a6d534a99c9b69f5a75
parentdaaf0c9eb5b98aba6317980782259c17416bdaf5 (diff)
downloadrust-d2195c483c2c0593b1b6cde7a9f4097ec9c17c10.tar.gz
rust-d2195c483c2c0593b1b6cde7a9f4097ec9c17c10.zip
Add test stage 2 snapshot tests
-rw-r--r--src/bootstrap/src/core/builder/tests.rs107
1 files changed, 97 insertions, 10 deletions
diff --git a/src/bootstrap/src/core/builder/tests.rs b/src/bootstrap/src/core/builder/tests.rs
index b3c13f22814..31f863f240f 100644
--- a/src/bootstrap/src/core/builder/tests.rs
+++ b/src/bootstrap/src/core/builder/tests.rs
@@ -2037,19 +2037,23 @@ mod snapshot {
                 .render_steps(), @"[check] rustc 0 <host> -> RunMakeSupport 1 <host>");
     }
 
+    fn prepare_test_config(ctx: &TestCtx) -> ConfigBuilder {
+        ctx.config("test")
+            // Bootstrap only runs by default on CI, so we have to emulate that also locally.
+            .args(&["--ci", "true"])
+            // These rustdoc tests requires nodejs to be present.
+            // We can't easily opt out of it, so if it is present on the local PC, the test
+            // would have different result on CI, where nodejs might be missing.
+            .args(&["--skip", "rustdoc-js-std"])
+            .args(&["--skip", "rustdoc-js"])
+            .args(&["--skip", "rustdoc-gui"])
+    }
+
     #[test]
-    fn test_all() {
+    fn test_all_stage_1() {
         let ctx = TestCtx::new();
         insta::assert_snapshot!(
-            ctx.config("test")
-                // Bootstrap only run by default on CI, so we have to emulate that also locally.
-                .args(&["--ci", "true"])
-                // These rustdoc tests requires nodejs to be present.
-                // We can't easily opt out of it, so if it is present on the local PC, the test
-                // would have different result on CI, where nodejs might be missing.
-                .args(&["--skip", "rustdoc-js-std"])
-                .args(&["--skip", "rustdoc-js"])
-                .args(&["--skip", "rustdoc-gui"])
+            prepare_test_config(&ctx)
                 .render_steps(), @r"
         [build] rustc 0 <host> -> Tidy 1 <host>
         [test] tidy <>
@@ -2125,6 +2129,89 @@ mod snapshot {
     }
 
     #[test]
+    fn test_all_stage_2() {
+        let ctx = TestCtx::new();
+        insta::assert_snapshot!(
+            prepare_test_config(&ctx)
+                .stage(2)
+                .render_steps(), @r"
+        [build] rustc 0 <host> -> Tidy 1 <host>
+        [test] tidy <>
+        [build] rustdoc 0 <host>
+        [build] llvm <host>
+        [build] rustc 0 <host> -> rustc 1 <host>
+        [build] rustc 1 <host> -> std 1 <host>
+        [build] rustc 1 <host> -> rustc 2 <host>
+        [build] rustc 2 <host> -> std 2 <host>
+        [build] rustc 0 <host> -> Compiletest 1 <host>
+        [test] Ui <host>
+        [test] Crashes <host>
+        [build] rustc 0 <host> -> CoverageDump 1 <host>
+        [build] rustc 2 <host> -> std 2 <host>
+        [test] CodegenLlvm <host>
+        [test] CodegenUnits <host>
+        [test] AssemblyLlvm <host>
+        [test] Incremental <host>
+        [test] Debuginfo <host>
+        [build] rustc 2 <host> -> rustc 3 <host>
+        [test] UiFullDeps <host>
+        [build] rustdoc 2 <host>
+        [test] Rustdoc <host>
+        [test] CoverageRunRustdoc <host>
+        [test] Pretty <host>
+        [build] rustc 2 <host> -> std 2 <host>
+        [build] rustc 1 <host> -> std 1 <host>
+        [build] rustdoc 1 <host>
+        [test] rustc 1 <host> -> CrateLibrustc 2 <host>
+        [test] crate-bootstrap <host> src/tools/coverage-dump
+        [test] crate-bootstrap <host> src/tools/jsondoclint
+        [test] crate-bootstrap <host> src/tools/replace-version-placeholder
+        [test] crate-bootstrap <host> tidyselftest
+        [build] rustc 0 <host> -> UnstableBookGen 1 <host>
+        [build] rustc 0 <host> -> Rustbook 1 <host>
+        [doc] unstable-book (book) <host>
+        [doc] book (book) <host>
+        [doc] book/first-edition (book) <host>
+        [doc] book/second-edition (book) <host>
+        [doc] book/2018-edition (book) <host>
+        [doc] rustc 1 <host> -> standalone 2 <host>
+        [doc] rustc 2 <host> -> std 2 <host> crates=[alloc,compiler_builtins,core,panic_abort,panic_unwind,proc_macro,rustc-std-workspace-core,std,std_detect,sysroot,test,unwind]
+        [build] rustc 1 <host> -> error-index 2 <host>
+        [doc] rustc 1 <host> -> error-index 2 <host>
+        [doc] nomicon (book) <host>
+        [doc] rustc 1 <host> -> reference (book) 2 <host>
+        [doc] rustdoc (book) <host>
+        [doc] rust-by-example (book) <host>
+        [build] rustc 0 <host> -> LintDocs 1 <host>
+        [doc] rustc (book) <host>
+        [doc] cargo (book) <host>
+        [doc] clippy (book) <host>
+        [doc] embedded-book (book) <host>
+        [doc] edition-guide (book) <host>
+        [doc] style-guide (book) <host>
+        [doc] rustc 1 <host> -> releases 2 <host>
+        [build] rustc 0 <host> -> Linkchecker 1 <host>
+        [test] link-check <host>
+        [test] tier-check <host>
+        [test] rustc 1 <host> -> rust-analyzer 2 <host>
+        [doc] rustc (book) <host>
+        [test] rustc 1 <host> -> lint-docs 2 <host>
+        [build] rustc 0 <host> -> RustdocTheme 1 <host>
+        [test] rustdoc-theme 2 <host>
+        [test] RustdocUi <host>
+        [build] rustc 0 <host> -> JsonDocCk 1 <host>
+        [build] rustc 0 <host> -> JsonDocLint 1 <host>
+        [test] RustdocJson <host>
+        [doc] rustc 1 <host> -> rustc 2 <host>
+        [build] rustc 0 <host> -> HtmlChecker 1 <host>
+        [test] html-check <host>
+        [build] rustc 0 <host> -> RunMakeSupport 1 <host>
+        [build] rustc 2 <host> -> cargo 3 <host>
+        [test] RunMake <host>
+        ");
+    }
+
+    #[test]
     fn test_exclude() {
         let ctx = TestCtx::new();
         let steps = ctx.config("test").args(&["--skip", "src/tools/tidy"]).get_steps();