Auto merge of #148424 - Zalathar:tests, r=Kobzol

bootstrap: Add snapshot tests for path-to-step handling

This PR adds a suite of snapshot tests for how bootstrap translates command-line “paths” (which are not necessarily actual paths) into a set of top-level steps to execute.

Unlike the existing suite of snapshot tests (for transitive step logging), I decided to use `.snap` files over inline snapshots, because I find that inline snapshots quickly make test files impossible to navigate. Instead, I set up a macro that makes it relatively easy to add or modify test cases.

Using `.snap` files also means that the tests can be blessed by setting `INSTA_UPDATE=always`, without necessarily needing the `cargo insta` tool installed, though the tool can still be used instead if desired.

These snapshot tests capture _current_ behavior, to prevent unintended changes or regressions. If the current behavior is wrong or undersirable, then any fix will necessarily have to re-bless the affected tests!

r? Kobzol
This commit is contained in:
bors 2025-11-12 06:53:53 +00:00
commit 95aeb46965
41 changed files with 1766 additions and 0 deletions

View file

@ -3413,6 +3413,13 @@ impl Step for Bootstrap {
.env("INSTA_WORKSPACE_ROOT", &builder.src)
.env("RUSTC_BOOTSTRAP", "1");
if builder.config.cmd.bless() {
// Tell `insta` to automatically bless any failing `.snap` files.
// Unlike compiletest blessing, the tests might still report failure.
// Does not bless inline snapshots.
cargo.env("INSTA_UPDATE", "always");
}
run_cargo_test(cargo, &[], &[], None, host, builder);
}

View file

@ -7,6 +7,9 @@ use std::path::PathBuf;
use crate::core::builder::{Builder, Kind, PathSet, ShouldRun, StepDescription};
#[cfg(test)]
mod tests;
pub(crate) const PATH_REMAP: &[(&str, &[&str])] = &[
// bootstrap.toml uses `rust-analyzer-proc-macro-srv`, but the
// actual path is `proc-macro-srv-cli`

View file

@ -0,0 +1,23 @@
---
source: src/bootstrap/src/core/builder/cli_paths/tests.rs
expression: build
---
[Build] compile::Std
targets: [aarch64-unknown-linux-gnu]
- Set({build::library})
- Set({build::library/alloc})
- Set({build::library/compiler-builtins/compiler-builtins})
- Set({build::library/core})
- Set({build::library/panic_abort})
- Set({build::library/panic_unwind})
- Set({build::library/proc_macro})
- Set({build::library/rustc-std-workspace-core})
- Set({build::library/std})
- Set({build::library/std_detect})
- Set({build::library/sysroot})
- Set({build::library/test})
- Set({build::library/unwind})
[Build] tool::Rustdoc
targets: [x86_64-unknown-linux-gnu]
- Set({build::src/librustdoc})
- Set({build::src/tools/rustdoc})

View file

@ -0,0 +1,84 @@
---
source: src/bootstrap/src/core/builder/cli_paths/tests.rs
expression: build compiler
---
[Build] compile::Rustc
targets: [x86_64-unknown-linux-gnu]
- Set({build::compiler/rustc_abi})
- Set({build::compiler/rustc_arena})
- Set({build::compiler/rustc_ast})
- Set({build::compiler/rustc_ast_ir})
- Set({build::compiler/rustc_ast_lowering})
- Set({build::compiler/rustc_ast_passes})
- Set({build::compiler/rustc_ast_pretty})
- Set({build::compiler/rustc_attr_parsing})
- Set({build::compiler/rustc_baked_icu_data})
- Set({build::compiler/rustc_borrowck})
- Set({build::compiler/rustc_builtin_macros})
- Set({build::compiler/rustc_codegen_llvm})
- Set({build::compiler/rustc_codegen_ssa})
- Set({build::compiler/rustc_const_eval})
- Set({build::compiler/rustc_data_structures})
- Set({build::compiler/rustc_driver})
- Set({build::compiler/rustc_driver_impl})
- Set({build::compiler/rustc_error_codes})
- Set({build::compiler/rustc_error_messages})
- Set({build::compiler/rustc_errors})
- Set({build::compiler/rustc_expand})
- Set({build::compiler/rustc_feature})
- Set({build::compiler/rustc_fluent_macro})
- Set({build::compiler/rustc_fs_util})
- Set({build::compiler/rustc_graphviz})
- Set({build::compiler/rustc_hashes})
- Set({build::compiler/rustc_hir})
- Set({build::compiler/rustc_hir_analysis})
- Set({build::compiler/rustc_hir_id})
- Set({build::compiler/rustc_hir_pretty})
- Set({build::compiler/rustc_hir_typeck})
- Set({build::compiler/rustc_incremental})
- Set({build::compiler/rustc_index})
- Set({build::compiler/rustc_index_macros})
- Set({build::compiler/rustc_infer})
- Set({build::compiler/rustc_interface})
- Set({build::compiler/rustc_lexer})
- Set({build::compiler/rustc_lint})
- Set({build::compiler/rustc_lint_defs})
- Set({build::compiler/rustc_llvm})
- Set({build::compiler/rustc_log})
- Set({build::compiler/rustc_macros})
- Set({build::compiler/rustc_metadata})
- Set({build::compiler/rustc_middle})
- Set({build::compiler/rustc_mir_build})
- Set({build::compiler/rustc_mir_dataflow})
- Set({build::compiler/rustc_mir_transform})
- Set({build::compiler/rustc_monomorphize})
- Set({build::compiler/rustc_next_trait_solver})
- Set({build::compiler/rustc_parse})
- Set({build::compiler/rustc_parse_format})
- Set({build::compiler/rustc_passes})
- Set({build::compiler/rustc_pattern_analysis})
- Set({build::compiler/rustc_privacy})
- Set({build::compiler/rustc_proc_macro})
- Set({build::compiler/rustc_public})
- Set({build::compiler/rustc_public_bridge})
- Set({build::compiler/rustc_query_impl})
- Set({build::compiler/rustc_query_system})
- Set({build::compiler/rustc_resolve})
- Set({build::compiler/rustc_sanitizers})
- Set({build::compiler/rustc_serialize})
- Set({build::compiler/rustc_session})
- Set({build::compiler/rustc_span})
- Set({build::compiler/rustc_symbol_mangling})
- Set({build::compiler/rustc_target})
- Set({build::compiler/rustc_thread_pool})
- Set({build::compiler/rustc_trait_selection})
- Set({build::compiler/rustc_traits})
- Set({build::compiler/rustc_transmute})
- Set({build::compiler/rustc_ty_utils})
- Set({build::compiler/rustc_type_ir})
- Set({build::compiler/rustc_type_ir_macros})
- Set({build::compiler/rustc_windows_rc})
[Build] compile::Assemble
targets: [x86_64-unknown-linux-gnu]
- Set({build::compiler})
- Set({build::compiler/rustc})

View file

@ -0,0 +1,7 @@
---
source: src/bootstrap/src/core/builder/cli_paths/tests.rs
expression: build compiletest
---
[Build] tool::Compiletest
targets: [aarch64-unknown-linux-gnu]
- Set({build::src/tools/compiletest})

View file

@ -0,0 +1,22 @@
---
source: src/bootstrap/src/core/builder/cli_paths/tests.rs
expression: build library
---
[Build] compile::Std
targets: [aarch64-unknown-linux-gnu]
- Set({build::library})
- Set({build::library/alloc})
- Set({build::library/compiler-builtins/compiler-builtins})
- Set({build::library/core})
- Set({build::library/panic_abort})
- Set({build::library/panic_unwind})
- Set({build::library/proc_macro})
- Set({build::library/rustc-std-workspace-core})
- Set({build::library/std})
- Set({build::library/std_detect})
- Set({build::library/sysroot})
- Set({build::library/test})
- Set({build::library/unwind})
[Build] compile::StartupObjects
targets: [aarch64-unknown-linux-gnu]
- Set({build::library/rtstartup})

View file

@ -0,0 +1,7 @@
---
source: src/bootstrap/src/core/builder/cli_paths/tests.rs
expression: build llvm
---
[Build] llvm::Llvm
targets: [x86_64-unknown-linux-gnu]
- Set({build::src/llvm-project/llvm})

View file

@ -0,0 +1,7 @@
---
source: src/bootstrap/src/core/builder/cli_paths/tests.rs
expression: build rustc
---
[Build] compile::Assemble
targets: [x86_64-unknown-linux-gnu]
- Set({build::compiler/rustc})

View file

@ -0,0 +1,7 @@
---
source: src/bootstrap/src/core/builder/cli_paths/tests.rs
expression: build rustc_llvm
---
[Build] compile::Rustc
targets: [x86_64-unknown-linux-gnu]
- Set({build::compiler/rustc_llvm})

View file

@ -0,0 +1,7 @@
---
source: src/bootstrap/src/core/builder/cli_paths/tests.rs
expression: build rustdoc
---
[Build] tool::Rustdoc
targets: [x86_64-unknown-linux-gnu]
- Set({build::src/tools/rustdoc})

View file

@ -0,0 +1,7 @@
---
source: src/bootstrap/src/core/builder/cli_paths/tests.rs
expression: build sysroot
---
[Build] compile::Std
targets: [aarch64-unknown-linux-gnu]
- Set({build::library/sysroot})

View file

@ -0,0 +1,134 @@
---
source: src/bootstrap/src/core/builder/cli_paths/tests.rs
expression: check
---
[Check] check::Rustc
targets: [x86_64-unknown-linux-gnu]
- Set({check::compiler})
- Set({check::compiler/rustc})
- Set({check::compiler/rustc_abi})
- Set({check::compiler/rustc_arena})
- Set({check::compiler/rustc_ast})
- Set({check::compiler/rustc_ast_ir})
- Set({check::compiler/rustc_ast_lowering})
- Set({check::compiler/rustc_ast_passes})
- Set({check::compiler/rustc_ast_pretty})
- Set({check::compiler/rustc_attr_parsing})
- Set({check::compiler/rustc_baked_icu_data})
- Set({check::compiler/rustc_borrowck})
- Set({check::compiler/rustc_builtin_macros})
- Set({check::compiler/rustc_codegen_llvm})
- Set({check::compiler/rustc_codegen_ssa})
- Set({check::compiler/rustc_const_eval})
- Set({check::compiler/rustc_data_structures})
- Set({check::compiler/rustc_driver})
- Set({check::compiler/rustc_driver_impl})
- Set({check::compiler/rustc_error_codes})
- Set({check::compiler/rustc_error_messages})
- Set({check::compiler/rustc_errors})
- Set({check::compiler/rustc_expand})
- Set({check::compiler/rustc_feature})
- Set({check::compiler/rustc_fluent_macro})
- Set({check::compiler/rustc_fs_util})
- Set({check::compiler/rustc_graphviz})
- Set({check::compiler/rustc_hashes})
- Set({check::compiler/rustc_hir})
- Set({check::compiler/rustc_hir_analysis})
- Set({check::compiler/rustc_hir_id})
- Set({check::compiler/rustc_hir_pretty})
- Set({check::compiler/rustc_hir_typeck})
- Set({check::compiler/rustc_incremental})
- Set({check::compiler/rustc_index})
- Set({check::compiler/rustc_index_macros})
- Set({check::compiler/rustc_infer})
- Set({check::compiler/rustc_interface})
- Set({check::compiler/rustc_lexer})
- Set({check::compiler/rustc_lint})
- Set({check::compiler/rustc_lint_defs})
- Set({check::compiler/rustc_llvm})
- Set({check::compiler/rustc_log})
- Set({check::compiler/rustc_macros})
- Set({check::compiler/rustc_metadata})
- Set({check::compiler/rustc_middle})
- Set({check::compiler/rustc_mir_build})
- Set({check::compiler/rustc_mir_dataflow})
- Set({check::compiler/rustc_mir_transform})
- Set({check::compiler/rustc_monomorphize})
- Set({check::compiler/rustc_next_trait_solver})
- Set({check::compiler/rustc_parse})
- Set({check::compiler/rustc_parse_format})
- Set({check::compiler/rustc_passes})
- Set({check::compiler/rustc_pattern_analysis})
- Set({check::compiler/rustc_privacy})
- Set({check::compiler/rustc_proc_macro})
- Set({check::compiler/rustc_public})
- Set({check::compiler/rustc_public_bridge})
- Set({check::compiler/rustc_query_impl})
- Set({check::compiler/rustc_query_system})
- Set({check::compiler/rustc_resolve})
- Set({check::compiler/rustc_sanitizers})
- Set({check::compiler/rustc_serialize})
- Set({check::compiler/rustc_session})
- Set({check::compiler/rustc_span})
- Set({check::compiler/rustc_symbol_mangling})
- Set({check::compiler/rustc_target})
- Set({check::compiler/rustc_thread_pool})
- Set({check::compiler/rustc_trait_selection})
- Set({check::compiler/rustc_traits})
- Set({check::compiler/rustc_transmute})
- Set({check::compiler/rustc_ty_utils})
- Set({check::compiler/rustc_type_ir})
- Set({check::compiler/rustc_type_ir_macros})
- Set({check::compiler/rustc_windows_rc})
[Check] check::Rustdoc
targets: [x86_64-unknown-linux-gnu]
- Set({check::src/librustdoc, check::src/tools/rustdoc})
[Check] check::CraneliftCodegenBackend
targets: [x86_64-unknown-linux-gnu]
- Set({check::cg_clif})
- Set({check::rustc_codegen_cranelift})
[Check] check::GccCodegenBackend
targets: [x86_64-unknown-linux-gnu]
- Set({check::cg_gcc})
- Set({check::rustc_codegen_gcc})
[Check] check::Clippy
targets: [x86_64-unknown-linux-gnu]
- Set({check::src/tools/clippy})
[Check] check::Miri
targets: [x86_64-unknown-linux-gnu]
- Set({check::src/tools/miri})
[Check] check::CargoMiri
targets: [x86_64-unknown-linux-gnu]
- Set({check::src/tools/miri/cargo-miri})
[Check] check::MiroptTestTools
targets: [x86_64-unknown-linux-gnu]
- Set({check::src/tools/miropt-test-tools})
[Check] check::Rustfmt
targets: [x86_64-unknown-linux-gnu]
- Set({check::src/tools/rustfmt})
[Check] check::RustAnalyzer
targets: [x86_64-unknown-linux-gnu]
- Set({check::src/tools/rust-analyzer})
[Check] check::TestFloatParse
targets: [x86_64-unknown-linux-gnu]
- Set({check::src/tools/test-float-parse})
[Check] check::FeaturesStatusDump
targets: [x86_64-unknown-linux-gnu]
- Set({check::src/tools/features-status-dump})
[Check] check::Std
targets: [aarch64-unknown-linux-gnu]
- Set({check::library})
- Set({check::library/alloc})
- Set({check::library/alloctests})
- Set({check::library/compiler-builtins/compiler-builtins})
- Set({check::library/core})
- Set({check::library/coretests})
- Set({check::library/panic_abort})
- Set({check::library/panic_unwind})
- Set({check::library/proc_macro})
- Set({check::library/rustc-std-workspace-core})
- Set({check::library/std})
- Set({check::library/std_detect})
- Set({check::library/sysroot})
- Set({check::library/test})
- Set({check::library/unwind})

View file

@ -0,0 +1,7 @@
---
source: src/bootstrap/src/core/builder/cli_paths/tests.rs
expression: check bootstrap
---
[Check] check::Bootstrap
targets: [x86_64-unknown-linux-gnu]
- Set({check::src/bootstrap})

View file

@ -0,0 +1,82 @@
---
source: src/bootstrap/src/core/builder/cli_paths/tests.rs
expression: check compiler
---
[Check] check::Rustc
targets: [x86_64-unknown-linux-gnu]
- Set({check::compiler})
- Set({check::compiler/rustc})
- Set({check::compiler/rustc_abi})
- Set({check::compiler/rustc_arena})
- Set({check::compiler/rustc_ast})
- Set({check::compiler/rustc_ast_ir})
- Set({check::compiler/rustc_ast_lowering})
- Set({check::compiler/rustc_ast_passes})
- Set({check::compiler/rustc_ast_pretty})
- Set({check::compiler/rustc_attr_parsing})
- Set({check::compiler/rustc_baked_icu_data})
- Set({check::compiler/rustc_borrowck})
- Set({check::compiler/rustc_builtin_macros})
- Set({check::compiler/rustc_codegen_llvm})
- Set({check::compiler/rustc_codegen_ssa})
- Set({check::compiler/rustc_const_eval})
- Set({check::compiler/rustc_data_structures})
- Set({check::compiler/rustc_driver})
- Set({check::compiler/rustc_driver_impl})
- Set({check::compiler/rustc_error_codes})
- Set({check::compiler/rustc_error_messages})
- Set({check::compiler/rustc_errors})
- Set({check::compiler/rustc_expand})
- Set({check::compiler/rustc_feature})
- Set({check::compiler/rustc_fluent_macro})
- Set({check::compiler/rustc_fs_util})
- Set({check::compiler/rustc_graphviz})
- Set({check::compiler/rustc_hashes})
- Set({check::compiler/rustc_hir})
- Set({check::compiler/rustc_hir_analysis})
- Set({check::compiler/rustc_hir_id})
- Set({check::compiler/rustc_hir_pretty})
- Set({check::compiler/rustc_hir_typeck})
- Set({check::compiler/rustc_incremental})
- Set({check::compiler/rustc_index})
- Set({check::compiler/rustc_index_macros})
- Set({check::compiler/rustc_infer})
- Set({check::compiler/rustc_interface})
- Set({check::compiler/rustc_lexer})
- Set({check::compiler/rustc_lint})
- Set({check::compiler/rustc_lint_defs})
- Set({check::compiler/rustc_llvm})
- Set({check::compiler/rustc_log})
- Set({check::compiler/rustc_macros})
- Set({check::compiler/rustc_metadata})
- Set({check::compiler/rustc_middle})
- Set({check::compiler/rustc_mir_build})
- Set({check::compiler/rustc_mir_dataflow})
- Set({check::compiler/rustc_mir_transform})
- Set({check::compiler/rustc_monomorphize})
- Set({check::compiler/rustc_next_trait_solver})
- Set({check::compiler/rustc_parse})
- Set({check::compiler/rustc_parse_format})
- Set({check::compiler/rustc_passes})
- Set({check::compiler/rustc_pattern_analysis})
- Set({check::compiler/rustc_privacy})
- Set({check::compiler/rustc_proc_macro})
- Set({check::compiler/rustc_public})
- Set({check::compiler/rustc_public_bridge})
- Set({check::compiler/rustc_query_impl})
- Set({check::compiler/rustc_query_system})
- Set({check::compiler/rustc_resolve})
- Set({check::compiler/rustc_sanitizers})
- Set({check::compiler/rustc_serialize})
- Set({check::compiler/rustc_session})
- Set({check::compiler/rustc_span})
- Set({check::compiler/rustc_symbol_mangling})
- Set({check::compiler/rustc_target})
- Set({check::compiler/rustc_thread_pool})
- Set({check::compiler/rustc_trait_selection})
- Set({check::compiler/rustc_traits})
- Set({check::compiler/rustc_transmute})
- Set({check::compiler/rustc_ty_utils})
- Set({check::compiler/rustc_type_ir})
- Set({check::compiler/rustc_type_ir_macros})
- Set({check::compiler/rustc_windows_rc})

View file

@ -0,0 +1,7 @@
---
source: src/bootstrap/src/core/builder/cli_paths/tests.rs
expression: check compiletest
---
[Check] check::Compiletest
targets: [x86_64-unknown-linux-gnu]
- Set({check::src/tools/compiletest})

View file

@ -0,0 +1,137 @@
---
source: src/bootstrap/src/core/builder/cli_paths/tests.rs
expression: check compiletest --include-default-paths
---
[Check] check::Rustc
targets: [x86_64-unknown-linux-gnu]
- Set({check::compiler})
- Set({check::compiler/rustc})
- Set({check::compiler/rustc_abi})
- Set({check::compiler/rustc_arena})
- Set({check::compiler/rustc_ast})
- Set({check::compiler/rustc_ast_ir})
- Set({check::compiler/rustc_ast_lowering})
- Set({check::compiler/rustc_ast_passes})
- Set({check::compiler/rustc_ast_pretty})
- Set({check::compiler/rustc_attr_parsing})
- Set({check::compiler/rustc_baked_icu_data})
- Set({check::compiler/rustc_borrowck})
- Set({check::compiler/rustc_builtin_macros})
- Set({check::compiler/rustc_codegen_llvm})
- Set({check::compiler/rustc_codegen_ssa})
- Set({check::compiler/rustc_const_eval})
- Set({check::compiler/rustc_data_structures})
- Set({check::compiler/rustc_driver})
- Set({check::compiler/rustc_driver_impl})
- Set({check::compiler/rustc_error_codes})
- Set({check::compiler/rustc_error_messages})
- Set({check::compiler/rustc_errors})
- Set({check::compiler/rustc_expand})
- Set({check::compiler/rustc_feature})
- Set({check::compiler/rustc_fluent_macro})
- Set({check::compiler/rustc_fs_util})
- Set({check::compiler/rustc_graphviz})
- Set({check::compiler/rustc_hashes})
- Set({check::compiler/rustc_hir})
- Set({check::compiler/rustc_hir_analysis})
- Set({check::compiler/rustc_hir_id})
- Set({check::compiler/rustc_hir_pretty})
- Set({check::compiler/rustc_hir_typeck})
- Set({check::compiler/rustc_incremental})
- Set({check::compiler/rustc_index})
- Set({check::compiler/rustc_index_macros})
- Set({check::compiler/rustc_infer})
- Set({check::compiler/rustc_interface})
- Set({check::compiler/rustc_lexer})
- Set({check::compiler/rustc_lint})
- Set({check::compiler/rustc_lint_defs})
- Set({check::compiler/rustc_llvm})
- Set({check::compiler/rustc_log})
- Set({check::compiler/rustc_macros})
- Set({check::compiler/rustc_metadata})
- Set({check::compiler/rustc_middle})
- Set({check::compiler/rustc_mir_build})
- Set({check::compiler/rustc_mir_dataflow})
- Set({check::compiler/rustc_mir_transform})
- Set({check::compiler/rustc_monomorphize})
- Set({check::compiler/rustc_next_trait_solver})
- Set({check::compiler/rustc_parse})
- Set({check::compiler/rustc_parse_format})
- Set({check::compiler/rustc_passes})
- Set({check::compiler/rustc_pattern_analysis})
- Set({check::compiler/rustc_privacy})
- Set({check::compiler/rustc_proc_macro})
- Set({check::compiler/rustc_public})
- Set({check::compiler/rustc_public_bridge})
- Set({check::compiler/rustc_query_impl})
- Set({check::compiler/rustc_query_system})
- Set({check::compiler/rustc_resolve})
- Set({check::compiler/rustc_sanitizers})
- Set({check::compiler/rustc_serialize})
- Set({check::compiler/rustc_session})
- Set({check::compiler/rustc_span})
- Set({check::compiler/rustc_symbol_mangling})
- Set({check::compiler/rustc_target})
- Set({check::compiler/rustc_thread_pool})
- Set({check::compiler/rustc_trait_selection})
- Set({check::compiler/rustc_traits})
- Set({check::compiler/rustc_transmute})
- Set({check::compiler/rustc_ty_utils})
- Set({check::compiler/rustc_type_ir})
- Set({check::compiler/rustc_type_ir_macros})
- Set({check::compiler/rustc_windows_rc})
[Check] check::Rustdoc
targets: [x86_64-unknown-linux-gnu]
- Set({check::src/librustdoc, check::src/tools/rustdoc})
[Check] check::CraneliftCodegenBackend
targets: [x86_64-unknown-linux-gnu]
- Set({check::cg_clif})
- Set({check::rustc_codegen_cranelift})
[Check] check::GccCodegenBackend
targets: [x86_64-unknown-linux-gnu]
- Set({check::cg_gcc})
- Set({check::rustc_codegen_gcc})
[Check] check::Clippy
targets: [x86_64-unknown-linux-gnu]
- Set({check::src/tools/clippy})
[Check] check::Miri
targets: [x86_64-unknown-linux-gnu]
- Set({check::src/tools/miri})
[Check] check::CargoMiri
targets: [x86_64-unknown-linux-gnu]
- Set({check::src/tools/miri/cargo-miri})
[Check] check::MiroptTestTools
targets: [x86_64-unknown-linux-gnu]
- Set({check::src/tools/miropt-test-tools})
[Check] check::Rustfmt
targets: [x86_64-unknown-linux-gnu]
- Set({check::src/tools/rustfmt})
[Check] check::RustAnalyzer
targets: [x86_64-unknown-linux-gnu]
- Set({check::src/tools/rust-analyzer})
[Check] check::TestFloatParse
targets: [x86_64-unknown-linux-gnu]
- Set({check::src/tools/test-float-parse})
[Check] check::FeaturesStatusDump
targets: [x86_64-unknown-linux-gnu]
- Set({check::src/tools/features-status-dump})
[Check] check::Std
targets: [aarch64-unknown-linux-gnu]
- Set({check::library})
- Set({check::library/alloc})
- Set({check::library/alloctests})
- Set({check::library/compiler-builtins/compiler-builtins})
- Set({check::library/core})
- Set({check::library/coretests})
- Set({check::library/panic_abort})
- Set({check::library/panic_unwind})
- Set({check::library/proc_macro})
- Set({check::library/rustc-std-workspace-core})
- Set({check::library/std})
- Set({check::library/std_detect})
- Set({check::library/sysroot})
- Set({check::library/test})
- Set({check::library/unwind})
[Check] check::Compiletest
targets: [x86_64-unknown-linux-gnu]
- Set({check::src/tools/compiletest})

View file

@ -0,0 +1,21 @@
---
source: src/bootstrap/src/core/builder/cli_paths/tests.rs
expression: check library
---
[Check] check::Std
targets: [aarch64-unknown-linux-gnu]
- Set({check::library})
- Set({check::library/alloc})
- Set({check::library/alloctests})
- Set({check::library/compiler-builtins/compiler-builtins})
- Set({check::library/core})
- Set({check::library/coretests})
- Set({check::library/panic_abort})
- Set({check::library/panic_unwind})
- Set({check::library/proc_macro})
- Set({check::library/rustc-std-workspace-core})
- Set({check::library/std})
- Set({check::library/std_detect})
- Set({check::library/sysroot})
- Set({check::library/test})
- Set({check::library/unwind})

View file

@ -0,0 +1,7 @@
---
source: src/bootstrap/src/core/builder/cli_paths/tests.rs
expression: check rustc
---
[Check] check::Rustc
targets: [x86_64-unknown-linux-gnu]
- Set({check::compiler/rustc})

View file

@ -0,0 +1,7 @@
---
source: src/bootstrap/src/core/builder/cli_paths/tests.rs
expression: check rustdoc
---
[Check] check::Rustdoc
targets: [x86_64-unknown-linux-gnu]
- Set({check::src/tools/rustdoc})

View file

@ -0,0 +1,34 @@
---
source: src/bootstrap/src/core/builder/cli_paths/tests.rs
expression: dist
---
[Dist] dist::Docs
targets: [aarch64-unknown-linux-gnu]
- Set({dist::rust-docs})
[Dist] dist::JsonDocs
targets: [aarch64-unknown-linux-gnu]
- Set({dist::rust-docs-json})
[Dist] dist::Mingw
targets: [aarch64-unknown-linux-gnu]
- Set({dist::rust-mingw})
[Dist] dist::Rustc
targets: [x86_64-unknown-linux-gnu]
- Set({dist::rustc})
[Dist] dist::Std
targets: [aarch64-unknown-linux-gnu]
- Set({dist::rust-std})
[Dist] dist::RustcDev
targets: [x86_64-unknown-linux-gnu]
- Set({dist::rustc-dev})
[Dist] dist::Src
targets: [x86_64-unknown-linux-gnu]
- Set({dist::rust-src})
[Dist] dist::RustDev
targets: [x86_64-unknown-linux-gnu]
- Set({dist::rust-dev})
[Dist] dist::PlainSourceTarball
targets: [x86_64-unknown-linux-gnu]
- Set({dist::rustc-src})
[Dist] dist::ReproducibleArtifacts
targets: [x86_64-unknown-linux-gnu]
- Set({dist::reproducible-artifacts})

View file

@ -0,0 +1,212 @@
---
source: src/bootstrap/src/core/builder/cli_paths/tests.rs
expression: test
---
[Test] test::Tidy
targets: [x86_64-unknown-linux-gnu]
- Set({test::src/tools/tidy})
[Test] test::Ui
targets: [aarch64-unknown-linux-gnu]
- Suite(test::tests/ui)
[Test] test::Crashes
targets: [aarch64-unknown-linux-gnu]
- Suite(test::tests/crashes)
[Test] test::Coverage
targets: [aarch64-unknown-linux-gnu]
- Set({test::coverage-map})
- Set({test::coverage-run})
- Suite(test::tests/coverage)
[Test] test::MirOpt
targets: [aarch64-unknown-linux-gnu]
- Suite(test::tests/mir-opt)
[Test] test::CodegenLlvm
targets: [aarch64-unknown-linux-gnu]
- Suite(test::tests/codegen-llvm)
[Test] test::CodegenUnits
targets: [aarch64-unknown-linux-gnu]
- Suite(test::tests/codegen-units)
[Test] test::AssemblyLlvm
targets: [aarch64-unknown-linux-gnu]
- Suite(test::tests/assembly-llvm)
[Test] test::Incremental
targets: [aarch64-unknown-linux-gnu]
- Suite(test::tests/incremental)
[Test] test::Debuginfo
targets: [aarch64-unknown-linux-gnu]
- Suite(test::tests/debuginfo)
[Test] test::UiFullDeps
targets: [x86_64-unknown-linux-gnu]
- Suite(test::tests/ui-fulldeps)
[Test] test::Rustdoc
targets: [x86_64-unknown-linux-gnu]
- Suite(test::tests/rustdoc)
[Test] test::CoverageRunRustdoc
targets: [x86_64-unknown-linux-gnu]
- Suite(test::tests/coverage-run-rustdoc)
[Test] test::Pretty
targets: [x86_64-unknown-linux-gnu]
- Suite(test::tests/pretty)
[Test] test::CodegenCranelift
targets: [x86_64-unknown-linux-gnu]
- Set({test::compiler/rustc_codegen_cranelift})
[Test] test::CodegenGCC
targets: [x86_64-unknown-linux-gnu]
- Set({test::compiler/rustc_codegen_gcc})
[Test] test::Crate
targets: [aarch64-unknown-linux-gnu]
- Set({test::library/alloc})
- Set({test::library/alloctests})
- Set({test::library/compiler-builtins/compiler-builtins})
- Set({test::library/core})
- Set({test::library/coretests})
- Set({test::library/panic_abort})
- Set({test::library/panic_unwind})
- Set({test::library/proc_macro})
- Set({test::library/rustc-std-workspace-core})
- Set({test::library/std})
- Set({test::library/std_detect})
- Set({test::library/sysroot})
- Set({test::library/test})
- Set({test::library/unwind})
[Test] test::CrateLibrustc
targets: [x86_64-unknown-linux-gnu]
- Set({test::compiler})
- Set({test::compiler/rustc})
- Set({test::compiler/rustc_abi})
- Set({test::compiler/rustc_arena})
- Set({test::compiler/rustc_ast})
- Set({test::compiler/rustc_ast_ir})
- Set({test::compiler/rustc_ast_lowering})
- Set({test::compiler/rustc_ast_passes})
- Set({test::compiler/rustc_ast_pretty})
- Set({test::compiler/rustc_attr_parsing})
- Set({test::compiler/rustc_baked_icu_data})
- Set({test::compiler/rustc_borrowck})
- Set({test::compiler/rustc_builtin_macros})
- Set({test::compiler/rustc_codegen_llvm})
- Set({test::compiler/rustc_codegen_ssa})
- Set({test::compiler/rustc_const_eval})
- Set({test::compiler/rustc_data_structures})
- Set({test::compiler/rustc_driver})
- Set({test::compiler/rustc_driver_impl})
- Set({test::compiler/rustc_error_codes})
- Set({test::compiler/rustc_error_messages})
- Set({test::compiler/rustc_errors})
- Set({test::compiler/rustc_expand})
- Set({test::compiler/rustc_feature})
- Set({test::compiler/rustc_fluent_macro})
- Set({test::compiler/rustc_fs_util})
- Set({test::compiler/rustc_graphviz})
- Set({test::compiler/rustc_hashes})
- Set({test::compiler/rustc_hir})
- Set({test::compiler/rustc_hir_analysis})
- Set({test::compiler/rustc_hir_id})
- Set({test::compiler/rustc_hir_pretty})
- Set({test::compiler/rustc_hir_typeck})
- Set({test::compiler/rustc_incremental})
- Set({test::compiler/rustc_index})
- Set({test::compiler/rustc_index_macros})
- Set({test::compiler/rustc_infer})
- Set({test::compiler/rustc_interface})
- Set({test::compiler/rustc_lexer})
- Set({test::compiler/rustc_lint})
- Set({test::compiler/rustc_lint_defs})
- Set({test::compiler/rustc_llvm})
- Set({test::compiler/rustc_log})
- Set({test::compiler/rustc_macros})
- Set({test::compiler/rustc_metadata})
- Set({test::compiler/rustc_middle})
- Set({test::compiler/rustc_mir_build})
- Set({test::compiler/rustc_mir_dataflow})
- Set({test::compiler/rustc_mir_transform})
- Set({test::compiler/rustc_monomorphize})
- Set({test::compiler/rustc_next_trait_solver})
- Set({test::compiler/rustc_parse})
- Set({test::compiler/rustc_parse_format})
- Set({test::compiler/rustc_passes})
- Set({test::compiler/rustc_pattern_analysis})
- Set({test::compiler/rustc_privacy})
- Set({test::compiler/rustc_proc_macro})
- Set({test::compiler/rustc_public})
- Set({test::compiler/rustc_public_bridge})
- Set({test::compiler/rustc_query_impl})
- Set({test::compiler/rustc_query_system})
- Set({test::compiler/rustc_resolve})
- Set({test::compiler/rustc_sanitizers})
- Set({test::compiler/rustc_serialize})
- Set({test::compiler/rustc_session})
- Set({test::compiler/rustc_span})
- Set({test::compiler/rustc_symbol_mangling})
- Set({test::compiler/rustc_target})
- Set({test::compiler/rustc_thread_pool})
- Set({test::compiler/rustc_trait_selection})
- Set({test::compiler/rustc_traits})
- Set({test::compiler/rustc_transmute})
- Set({test::compiler/rustc_ty_utils})
- Set({test::compiler/rustc_type_ir})
- Set({test::compiler/rustc_type_ir_macros})
- Set({test::compiler/rustc_windows_rc})
[Test] test::CrateRustdoc
targets: [x86_64-unknown-linux-gnu]
- Set({test::src/librustdoc, test::src/tools/rustdoc})
[Test] test::CrateRustdocJsonTypes
targets: [x86_64-unknown-linux-gnu]
- Set({test::src/rustdoc-json-types})
[Test] test::CrateBootstrap
targets: [x86_64-unknown-linux-gnu]
- Set({test::src/tools/coverage-dump})
- Set({test::src/tools/jsondoclint})
- Set({test::src/tools/replace-version-placeholder})
- Set({test::tidyselftest})
[Test] test::Linkcheck
targets: [x86_64-unknown-linux-gnu]
- Set({test::src/tools/linkchecker})
[Test] test::TierCheck
targets: [x86_64-unknown-linux-gnu]
- Set({test::src/tools/tier-check})
[Test] test::RustAnalyzer
targets: [x86_64-unknown-linux-gnu]
- Set({test::src/tools/rust-analyzer})
[Test] test::ErrorIndex
targets: [x86_64-unknown-linux-gnu]
- Set({test::error-index})
- Set({test::src/tools/error_index_generator})
[Test] test::RustdocBook
targets: [x86_64-unknown-linux-gnu]
- Set({test::src/doc/rustdoc})
[Test] test::UnstableBook
targets: [x86_64-unknown-linux-gnu]
- Set({test::src/doc/unstable-book})
[Test] test::RustcBook
targets: [x86_64-unknown-linux-gnu]
- Set({test::src/doc/rustc})
[Test] test::RustdocJSStd
targets: [x86_64-unknown-linux-gnu]
- Suite(test::tests/rustdoc-js-std)
[Test] test::RustdocJSNotStd
targets: [x86_64-unknown-linux-gnu]
- Suite(test::tests/rustdoc-js)
[Test] test::RustdocTheme
targets: [x86_64-unknown-linux-gnu]
- Set({test::src/tools/rustdoc-themes})
[Test] test::RustdocUi
targets: [x86_64-unknown-linux-gnu]
- Suite(test::tests/rustdoc-ui)
[Test] test::RustdocJson
targets: [x86_64-unknown-linux-gnu]
- Suite(test::tests/rustdoc-json)
[Test] test::HtmlCheck
targets: [x86_64-unknown-linux-gnu]
- Set({test::src/tools/html-checker})
[Test] test::RustInstaller
targets: [x86_64-unknown-linux-gnu]
- Set({test::src/tools/rust-installer})
[Test] test::TestFloatParse
targets: [x86_64-unknown-linux-gnu]
- Set({test::src/tools/test-float-parse})
[Test] test::RunMake
targets: [aarch64-unknown-linux-gnu]
- Suite(test::tests/run-make)
[Test] test::RunMakeCargo
targets: [aarch64-unknown-linux-gnu]
- Suite(test::tests/run-make-cargo)

View file

@ -0,0 +1,7 @@
---
source: src/bootstrap/src/core/builder/cli_paths/tests.rs
expression: test coverage
---
[Test] test::Coverage
targets: [aarch64-unknown-linux-gnu]
- Suite(test::tests/coverage)

View file

@ -0,0 +1,7 @@
---
source: src/bootstrap/src/core/builder/cli_paths/tests.rs
expression: test coverage-map
---
[Test] test::Coverage
targets: [aarch64-unknown-linux-gnu]
- Set({test::coverage-map})

View file

@ -0,0 +1,7 @@
---
source: src/bootstrap/src/core/builder/cli_paths/tests.rs
expression: test coverage-run
---
[Test] test::Coverage
targets: [aarch64-unknown-linux-gnu]
- Set({test::coverage-run})

View file

@ -0,0 +1,7 @@
---
source: src/bootstrap/src/core/builder/cli_paths/tests.rs
expression: test coverage --skip=coverage-run
---
[Test] test::Coverage
targets: [aarch64-unknown-linux-gnu]
- Suite(test::tests/coverage)

View file

@ -0,0 +1,7 @@
---
source: src/bootstrap/src/core/builder/cli_paths/tests.rs
expression: test debuginfo
---
[Test] test::Debuginfo
targets: [aarch64-unknown-linux-gnu]
- Suite(test::tests/debuginfo)

View file

@ -0,0 +1,20 @@
---
source: src/bootstrap/src/core/builder/cli_paths/tests.rs
expression: test library
---
[Test] test::Crate
targets: [aarch64-unknown-linux-gnu]
- Set({test::library/alloc})
- Set({test::library/alloctests})
- Set({test::library/compiler-builtins/compiler-builtins})
- Set({test::library/core})
- Set({test::library/coretests})
- Set({test::library/panic_abort})
- Set({test::library/panic_unwind})
- Set({test::library/proc_macro})
- Set({test::library/rustc-std-workspace-core})
- Set({test::library/std})
- Set({test::library/std_detect})
- Set({test::library/sysroot})
- Set({test::library/test})
- Set({test::library/unwind})

View file

@ -0,0 +1,7 @@
---
source: src/bootstrap/src/core/builder/cli_paths/tests.rs
expression: test librustdoc
---
[Test] test::CrateRustdoc
targets: [x86_64-unknown-linux-gnu]
- Set({test::src/librustdoc})

View file

@ -0,0 +1,13 @@
---
source: src/bootstrap/src/core/builder/cli_paths/tests.rs
expression: test librustdoc rustdoc
---
[Test] test::CrateRustdoc
targets: [x86_64-unknown-linux-gnu]
- Set({test::src/librustdoc, test::src/tools/rustdoc})
[Test] test::Rustdoc
targets: [x86_64-unknown-linux-gnu]
- Suite(test::tests/rustdoc)
[Test] test::RustdocBook
targets: [x86_64-unknown-linux-gnu]
- Set({test::src/doc/rustdoc})

View file

@ -0,0 +1,13 @@
---
source: src/bootstrap/src/core/builder/cli_paths/tests.rs
expression: test rustdoc
---
[Test] test::Rustdoc
targets: [x86_64-unknown-linux-gnu]
- Suite(test::tests/rustdoc)
[Test] test::CrateRustdoc
targets: [x86_64-unknown-linux-gnu]
- Set({test::src/tools/rustdoc})
[Test] test::RustdocBook
targets: [x86_64-unknown-linux-gnu]
- Set({test::src/doc/rustdoc})

View file

@ -0,0 +1,211 @@
---
source: src/bootstrap/src/core/builder/cli_paths/tests.rs
expression: test --skip=coverage
---
[Test] test::Tidy
targets: [x86_64-unknown-linux-gnu]
- Set({test::src/tools/tidy})
[Test] test::Ui
targets: [aarch64-unknown-linux-gnu]
- Suite(test::tests/ui)
[Test] test::Crashes
targets: [aarch64-unknown-linux-gnu]
- Suite(test::tests/crashes)
[Test] test::Coverage
targets: [aarch64-unknown-linux-gnu]
- Set({test::coverage-map})
- Set({test::coverage-run})
[Test] test::MirOpt
targets: [aarch64-unknown-linux-gnu]
- Suite(test::tests/mir-opt)
[Test] test::CodegenLlvm
targets: [aarch64-unknown-linux-gnu]
- Suite(test::tests/codegen-llvm)
[Test] test::CodegenUnits
targets: [aarch64-unknown-linux-gnu]
- Suite(test::tests/codegen-units)
[Test] test::AssemblyLlvm
targets: [aarch64-unknown-linux-gnu]
- Suite(test::tests/assembly-llvm)
[Test] test::Incremental
targets: [aarch64-unknown-linux-gnu]
- Suite(test::tests/incremental)
[Test] test::Debuginfo
targets: [aarch64-unknown-linux-gnu]
- Suite(test::tests/debuginfo)
[Test] test::UiFullDeps
targets: [x86_64-unknown-linux-gnu]
- Suite(test::tests/ui-fulldeps)
[Test] test::Rustdoc
targets: [x86_64-unknown-linux-gnu]
- Suite(test::tests/rustdoc)
[Test] test::CoverageRunRustdoc
targets: [x86_64-unknown-linux-gnu]
- Suite(test::tests/coverage-run-rustdoc)
[Test] test::Pretty
targets: [x86_64-unknown-linux-gnu]
- Suite(test::tests/pretty)
[Test] test::CodegenCranelift
targets: [x86_64-unknown-linux-gnu]
- Set({test::compiler/rustc_codegen_cranelift})
[Test] test::CodegenGCC
targets: [x86_64-unknown-linux-gnu]
- Set({test::compiler/rustc_codegen_gcc})
[Test] test::Crate
targets: [aarch64-unknown-linux-gnu]
- Set({test::library/alloc})
- Set({test::library/alloctests})
- Set({test::library/compiler-builtins/compiler-builtins})
- Set({test::library/core})
- Set({test::library/coretests})
- Set({test::library/panic_abort})
- Set({test::library/panic_unwind})
- Set({test::library/proc_macro})
- Set({test::library/rustc-std-workspace-core})
- Set({test::library/std})
- Set({test::library/std_detect})
- Set({test::library/sysroot})
- Set({test::library/test})
- Set({test::library/unwind})
[Test] test::CrateLibrustc
targets: [x86_64-unknown-linux-gnu]
- Set({test::compiler})
- Set({test::compiler/rustc})
- Set({test::compiler/rustc_abi})
- Set({test::compiler/rustc_arena})
- Set({test::compiler/rustc_ast})
- Set({test::compiler/rustc_ast_ir})
- Set({test::compiler/rustc_ast_lowering})
- Set({test::compiler/rustc_ast_passes})
- Set({test::compiler/rustc_ast_pretty})
- Set({test::compiler/rustc_attr_parsing})
- Set({test::compiler/rustc_baked_icu_data})
- Set({test::compiler/rustc_borrowck})
- Set({test::compiler/rustc_builtin_macros})
- Set({test::compiler/rustc_codegen_llvm})
- Set({test::compiler/rustc_codegen_ssa})
- Set({test::compiler/rustc_const_eval})
- Set({test::compiler/rustc_data_structures})
- Set({test::compiler/rustc_driver})
- Set({test::compiler/rustc_driver_impl})
- Set({test::compiler/rustc_error_codes})
- Set({test::compiler/rustc_error_messages})
- Set({test::compiler/rustc_errors})
- Set({test::compiler/rustc_expand})
- Set({test::compiler/rustc_feature})
- Set({test::compiler/rustc_fluent_macro})
- Set({test::compiler/rustc_fs_util})
- Set({test::compiler/rustc_graphviz})
- Set({test::compiler/rustc_hashes})
- Set({test::compiler/rustc_hir})
- Set({test::compiler/rustc_hir_analysis})
- Set({test::compiler/rustc_hir_id})
- Set({test::compiler/rustc_hir_pretty})
- Set({test::compiler/rustc_hir_typeck})
- Set({test::compiler/rustc_incremental})
- Set({test::compiler/rustc_index})
- Set({test::compiler/rustc_index_macros})
- Set({test::compiler/rustc_infer})
- Set({test::compiler/rustc_interface})
- Set({test::compiler/rustc_lexer})
- Set({test::compiler/rustc_lint})
- Set({test::compiler/rustc_lint_defs})
- Set({test::compiler/rustc_llvm})
- Set({test::compiler/rustc_log})
- Set({test::compiler/rustc_macros})
- Set({test::compiler/rustc_metadata})
- Set({test::compiler/rustc_middle})
- Set({test::compiler/rustc_mir_build})
- Set({test::compiler/rustc_mir_dataflow})
- Set({test::compiler/rustc_mir_transform})
- Set({test::compiler/rustc_monomorphize})
- Set({test::compiler/rustc_next_trait_solver})
- Set({test::compiler/rustc_parse})
- Set({test::compiler/rustc_parse_format})
- Set({test::compiler/rustc_passes})
- Set({test::compiler/rustc_pattern_analysis})
- Set({test::compiler/rustc_privacy})
- Set({test::compiler/rustc_proc_macro})
- Set({test::compiler/rustc_public})
- Set({test::compiler/rustc_public_bridge})
- Set({test::compiler/rustc_query_impl})
- Set({test::compiler/rustc_query_system})
- Set({test::compiler/rustc_resolve})
- Set({test::compiler/rustc_sanitizers})
- Set({test::compiler/rustc_serialize})
- Set({test::compiler/rustc_session})
- Set({test::compiler/rustc_span})
- Set({test::compiler/rustc_symbol_mangling})
- Set({test::compiler/rustc_target})
- Set({test::compiler/rustc_thread_pool})
- Set({test::compiler/rustc_trait_selection})
- Set({test::compiler/rustc_traits})
- Set({test::compiler/rustc_transmute})
- Set({test::compiler/rustc_ty_utils})
- Set({test::compiler/rustc_type_ir})
- Set({test::compiler/rustc_type_ir_macros})
- Set({test::compiler/rustc_windows_rc})
[Test] test::CrateRustdoc
targets: [x86_64-unknown-linux-gnu]
- Set({test::src/librustdoc, test::src/tools/rustdoc})
[Test] test::CrateRustdocJsonTypes
targets: [x86_64-unknown-linux-gnu]
- Set({test::src/rustdoc-json-types})
[Test] test::CrateBootstrap
targets: [x86_64-unknown-linux-gnu]
- Set({test::src/tools/coverage-dump})
- Set({test::src/tools/jsondoclint})
- Set({test::src/tools/replace-version-placeholder})
- Set({test::tidyselftest})
[Test] test::Linkcheck
targets: [x86_64-unknown-linux-gnu]
- Set({test::src/tools/linkchecker})
[Test] test::TierCheck
targets: [x86_64-unknown-linux-gnu]
- Set({test::src/tools/tier-check})
[Test] test::RustAnalyzer
targets: [x86_64-unknown-linux-gnu]
- Set({test::src/tools/rust-analyzer})
[Test] test::ErrorIndex
targets: [x86_64-unknown-linux-gnu]
- Set({test::error-index})
- Set({test::src/tools/error_index_generator})
[Test] test::RustdocBook
targets: [x86_64-unknown-linux-gnu]
- Set({test::src/doc/rustdoc})
[Test] test::UnstableBook
targets: [x86_64-unknown-linux-gnu]
- Set({test::src/doc/unstable-book})
[Test] test::RustcBook
targets: [x86_64-unknown-linux-gnu]
- Set({test::src/doc/rustc})
[Test] test::RustdocJSStd
targets: [x86_64-unknown-linux-gnu]
- Suite(test::tests/rustdoc-js-std)
[Test] test::RustdocJSNotStd
targets: [x86_64-unknown-linux-gnu]
- Suite(test::tests/rustdoc-js)
[Test] test::RustdocTheme
targets: [x86_64-unknown-linux-gnu]
- Set({test::src/tools/rustdoc-themes})
[Test] test::RustdocUi
targets: [x86_64-unknown-linux-gnu]
- Suite(test::tests/rustdoc-ui)
[Test] test::RustdocJson
targets: [x86_64-unknown-linux-gnu]
- Suite(test::tests/rustdoc-json)
[Test] test::HtmlCheck
targets: [x86_64-unknown-linux-gnu]
- Set({test::src/tools/html-checker})
[Test] test::RustInstaller
targets: [x86_64-unknown-linux-gnu]
- Set({test::src/tools/rust-installer})
[Test] test::TestFloatParse
targets: [x86_64-unknown-linux-gnu]
- Set({test::src/tools/test-float-parse})
[Test] test::RunMake
targets: [aarch64-unknown-linux-gnu]
- Suite(test::tests/run-make)
[Test] test::RunMakeCargo
targets: [aarch64-unknown-linux-gnu]
- Suite(test::tests/run-make-cargo)

View file

@ -0,0 +1,157 @@
---
source: src/bootstrap/src/core/builder/cli_paths/tests.rs
expression: test --skip=tests
---
[Test] test::Tidy
targets: [x86_64-unknown-linux-gnu]
- Set({test::src/tools/tidy})
[Test] test::Coverage
targets: [aarch64-unknown-linux-gnu]
- Set({test::coverage-map})
- Set({test::coverage-run})
[Test] test::CodegenCranelift
targets: [x86_64-unknown-linux-gnu]
- Set({test::compiler/rustc_codegen_cranelift})
[Test] test::CodegenGCC
targets: [x86_64-unknown-linux-gnu]
- Set({test::compiler/rustc_codegen_gcc})
[Test] test::Crate
targets: [aarch64-unknown-linux-gnu]
- Set({test::library/alloc})
- Set({test::library/alloctests})
- Set({test::library/compiler-builtins/compiler-builtins})
- Set({test::library/core})
- Set({test::library/coretests})
- Set({test::library/panic_abort})
- Set({test::library/panic_unwind})
- Set({test::library/proc_macro})
- Set({test::library/rustc-std-workspace-core})
- Set({test::library/std})
- Set({test::library/std_detect})
- Set({test::library/sysroot})
- Set({test::library/test})
- Set({test::library/unwind})
[Test] test::CrateLibrustc
targets: [x86_64-unknown-linux-gnu]
- Set({test::compiler})
- Set({test::compiler/rustc})
- Set({test::compiler/rustc_abi})
- Set({test::compiler/rustc_arena})
- Set({test::compiler/rustc_ast})
- Set({test::compiler/rustc_ast_ir})
- Set({test::compiler/rustc_ast_lowering})
- Set({test::compiler/rustc_ast_passes})
- Set({test::compiler/rustc_ast_pretty})
- Set({test::compiler/rustc_attr_parsing})
- Set({test::compiler/rustc_baked_icu_data})
- Set({test::compiler/rustc_borrowck})
- Set({test::compiler/rustc_builtin_macros})
- Set({test::compiler/rustc_codegen_llvm})
- Set({test::compiler/rustc_codegen_ssa})
- Set({test::compiler/rustc_const_eval})
- Set({test::compiler/rustc_data_structures})
- Set({test::compiler/rustc_driver})
- Set({test::compiler/rustc_driver_impl})
- Set({test::compiler/rustc_error_codes})
- Set({test::compiler/rustc_error_messages})
- Set({test::compiler/rustc_errors})
- Set({test::compiler/rustc_expand})
- Set({test::compiler/rustc_feature})
- Set({test::compiler/rustc_fluent_macro})
- Set({test::compiler/rustc_fs_util})
- Set({test::compiler/rustc_graphviz})
- Set({test::compiler/rustc_hashes})
- Set({test::compiler/rustc_hir})
- Set({test::compiler/rustc_hir_analysis})
- Set({test::compiler/rustc_hir_id})
- Set({test::compiler/rustc_hir_pretty})
- Set({test::compiler/rustc_hir_typeck})
- Set({test::compiler/rustc_incremental})
- Set({test::compiler/rustc_index})
- Set({test::compiler/rustc_index_macros})
- Set({test::compiler/rustc_infer})
- Set({test::compiler/rustc_interface})
- Set({test::compiler/rustc_lexer})
- Set({test::compiler/rustc_lint})
- Set({test::compiler/rustc_lint_defs})
- Set({test::compiler/rustc_llvm})
- Set({test::compiler/rustc_log})
- Set({test::compiler/rustc_macros})
- Set({test::compiler/rustc_metadata})
- Set({test::compiler/rustc_middle})
- Set({test::compiler/rustc_mir_build})
- Set({test::compiler/rustc_mir_dataflow})
- Set({test::compiler/rustc_mir_transform})
- Set({test::compiler/rustc_monomorphize})
- Set({test::compiler/rustc_next_trait_solver})
- Set({test::compiler/rustc_parse})
- Set({test::compiler/rustc_parse_format})
- Set({test::compiler/rustc_passes})
- Set({test::compiler/rustc_pattern_analysis})
- Set({test::compiler/rustc_privacy})
- Set({test::compiler/rustc_proc_macro})
- Set({test::compiler/rustc_public})
- Set({test::compiler/rustc_public_bridge})
- Set({test::compiler/rustc_query_impl})
- Set({test::compiler/rustc_query_system})
- Set({test::compiler/rustc_resolve})
- Set({test::compiler/rustc_sanitizers})
- Set({test::compiler/rustc_serialize})
- Set({test::compiler/rustc_session})
- Set({test::compiler/rustc_span})
- Set({test::compiler/rustc_symbol_mangling})
- Set({test::compiler/rustc_target})
- Set({test::compiler/rustc_thread_pool})
- Set({test::compiler/rustc_trait_selection})
- Set({test::compiler/rustc_traits})
- Set({test::compiler/rustc_transmute})
- Set({test::compiler/rustc_ty_utils})
- Set({test::compiler/rustc_type_ir})
- Set({test::compiler/rustc_type_ir_macros})
- Set({test::compiler/rustc_windows_rc})
[Test] test::CrateRustdoc
targets: [x86_64-unknown-linux-gnu]
- Set({test::src/librustdoc, test::src/tools/rustdoc})
[Test] test::CrateRustdocJsonTypes
targets: [x86_64-unknown-linux-gnu]
- Set({test::src/rustdoc-json-types})
[Test] test::CrateBootstrap
targets: [x86_64-unknown-linux-gnu]
- Set({test::src/tools/coverage-dump})
- Set({test::src/tools/jsondoclint})
- Set({test::src/tools/replace-version-placeholder})
- Set({test::tidyselftest})
[Test] test::Linkcheck
targets: [x86_64-unknown-linux-gnu]
- Set({test::src/tools/linkchecker})
[Test] test::TierCheck
targets: [x86_64-unknown-linux-gnu]
- Set({test::src/tools/tier-check})
[Test] test::RustAnalyzer
targets: [x86_64-unknown-linux-gnu]
- Set({test::src/tools/rust-analyzer})
[Test] test::ErrorIndex
targets: [x86_64-unknown-linux-gnu]
- Set({test::error-index})
- Set({test::src/tools/error_index_generator})
[Test] test::RustdocBook
targets: [x86_64-unknown-linux-gnu]
- Set({test::src/doc/rustdoc})
[Test] test::UnstableBook
targets: [x86_64-unknown-linux-gnu]
- Set({test::src/doc/unstable-book})
[Test] test::RustcBook
targets: [x86_64-unknown-linux-gnu]
- Set({test::src/doc/rustc})
[Test] test::RustdocTheme
targets: [x86_64-unknown-linux-gnu]
- Set({test::src/tools/rustdoc-themes})
[Test] test::HtmlCheck
targets: [x86_64-unknown-linux-gnu]
- Set({test::src/tools/html-checker})
[Test] test::RustInstaller
targets: [x86_64-unknown-linux-gnu]
- Set({test::src/tools/rust-installer})
[Test] test::TestFloatParse
targets: [x86_64-unknown-linux-gnu]
- Set({test::src/tools/test-float-parse})

View file

@ -0,0 +1,136 @@
---
source: src/bootstrap/src/core/builder/cli_paths/tests.rs
expression: test --skip=tests --skip=coverage-map --skip=coverage-run --skip=library --skip=tidyselftest
---
[Test] test::Tidy
targets: [x86_64-unknown-linux-gnu]
- Set({test::src/tools/tidy})
[Test] test::CodegenCranelift
targets: [x86_64-unknown-linux-gnu]
- Set({test::compiler/rustc_codegen_cranelift})
[Test] test::CodegenGCC
targets: [x86_64-unknown-linux-gnu]
- Set({test::compiler/rustc_codegen_gcc})
[Test] test::CrateLibrustc
targets: [x86_64-unknown-linux-gnu]
- Set({test::compiler})
- Set({test::compiler/rustc})
- Set({test::compiler/rustc_abi})
- Set({test::compiler/rustc_arena})
- Set({test::compiler/rustc_ast})
- Set({test::compiler/rustc_ast_ir})
- Set({test::compiler/rustc_ast_lowering})
- Set({test::compiler/rustc_ast_passes})
- Set({test::compiler/rustc_ast_pretty})
- Set({test::compiler/rustc_attr_parsing})
- Set({test::compiler/rustc_baked_icu_data})
- Set({test::compiler/rustc_borrowck})
- Set({test::compiler/rustc_builtin_macros})
- Set({test::compiler/rustc_codegen_llvm})
- Set({test::compiler/rustc_codegen_ssa})
- Set({test::compiler/rustc_const_eval})
- Set({test::compiler/rustc_data_structures})
- Set({test::compiler/rustc_driver})
- Set({test::compiler/rustc_driver_impl})
- Set({test::compiler/rustc_error_codes})
- Set({test::compiler/rustc_error_messages})
- Set({test::compiler/rustc_errors})
- Set({test::compiler/rustc_expand})
- Set({test::compiler/rustc_feature})
- Set({test::compiler/rustc_fluent_macro})
- Set({test::compiler/rustc_fs_util})
- Set({test::compiler/rustc_graphviz})
- Set({test::compiler/rustc_hashes})
- Set({test::compiler/rustc_hir})
- Set({test::compiler/rustc_hir_analysis})
- Set({test::compiler/rustc_hir_id})
- Set({test::compiler/rustc_hir_pretty})
- Set({test::compiler/rustc_hir_typeck})
- Set({test::compiler/rustc_incremental})
- Set({test::compiler/rustc_index})
- Set({test::compiler/rustc_index_macros})
- Set({test::compiler/rustc_infer})
- Set({test::compiler/rustc_interface})
- Set({test::compiler/rustc_lexer})
- Set({test::compiler/rustc_lint})
- Set({test::compiler/rustc_lint_defs})
- Set({test::compiler/rustc_llvm})
- Set({test::compiler/rustc_log})
- Set({test::compiler/rustc_macros})
- Set({test::compiler/rustc_metadata})
- Set({test::compiler/rustc_middle})
- Set({test::compiler/rustc_mir_build})
- Set({test::compiler/rustc_mir_dataflow})
- Set({test::compiler/rustc_mir_transform})
- Set({test::compiler/rustc_monomorphize})
- Set({test::compiler/rustc_next_trait_solver})
- Set({test::compiler/rustc_parse})
- Set({test::compiler/rustc_parse_format})
- Set({test::compiler/rustc_passes})
- Set({test::compiler/rustc_pattern_analysis})
- Set({test::compiler/rustc_privacy})
- Set({test::compiler/rustc_proc_macro})
- Set({test::compiler/rustc_public})
- Set({test::compiler/rustc_public_bridge})
- Set({test::compiler/rustc_query_impl})
- Set({test::compiler/rustc_query_system})
- Set({test::compiler/rustc_resolve})
- Set({test::compiler/rustc_sanitizers})
- Set({test::compiler/rustc_serialize})
- Set({test::compiler/rustc_session})
- Set({test::compiler/rustc_span})
- Set({test::compiler/rustc_symbol_mangling})
- Set({test::compiler/rustc_target})
- Set({test::compiler/rustc_thread_pool})
- Set({test::compiler/rustc_trait_selection})
- Set({test::compiler/rustc_traits})
- Set({test::compiler/rustc_transmute})
- Set({test::compiler/rustc_ty_utils})
- Set({test::compiler/rustc_type_ir})
- Set({test::compiler/rustc_type_ir_macros})
- Set({test::compiler/rustc_windows_rc})
[Test] test::CrateRustdoc
targets: [x86_64-unknown-linux-gnu]
- Set({test::src/librustdoc, test::src/tools/rustdoc})
[Test] test::CrateRustdocJsonTypes
targets: [x86_64-unknown-linux-gnu]
- Set({test::src/rustdoc-json-types})
[Test] test::CrateBootstrap
targets: [x86_64-unknown-linux-gnu]
- Set({test::src/tools/coverage-dump})
- Set({test::src/tools/jsondoclint})
- Set({test::src/tools/replace-version-placeholder})
[Test] test::Linkcheck
targets: [x86_64-unknown-linux-gnu]
- Set({test::src/tools/linkchecker})
[Test] test::TierCheck
targets: [x86_64-unknown-linux-gnu]
- Set({test::src/tools/tier-check})
[Test] test::RustAnalyzer
targets: [x86_64-unknown-linux-gnu]
- Set({test::src/tools/rust-analyzer})
[Test] test::ErrorIndex
targets: [x86_64-unknown-linux-gnu]
- Set({test::error-index})
- Set({test::src/tools/error_index_generator})
[Test] test::RustdocBook
targets: [x86_64-unknown-linux-gnu]
- Set({test::src/doc/rustdoc})
[Test] test::UnstableBook
targets: [x86_64-unknown-linux-gnu]
- Set({test::src/doc/unstable-book})
[Test] test::RustcBook
targets: [x86_64-unknown-linux-gnu]
- Set({test::src/doc/rustc})
[Test] test::RustdocTheme
targets: [x86_64-unknown-linux-gnu]
- Set({test::src/tools/rustdoc-themes})
[Test] test::HtmlCheck
targets: [x86_64-unknown-linux-gnu]
- Set({test::src/tools/html-checker})
[Test] test::RustInstaller
targets: [x86_64-unknown-linux-gnu]
- Set({test::src/tools/rust-installer})
[Test] test::TestFloatParse
targets: [x86_64-unknown-linux-gnu]
- Set({test::src/tools/test-float-parse})

View file

@ -0,0 +1,64 @@
---
source: src/bootstrap/src/core/builder/cli_paths/tests.rs
expression: test tests
---
[Test] test::AssemblyLlvm
targets: [aarch64-unknown-linux-gnu]
- Suite(test::tests/assembly-llvm)
[Test] test::CodegenLlvm
targets: [aarch64-unknown-linux-gnu]
- Suite(test::tests/codegen-llvm)
[Test] test::CodegenUnits
targets: [aarch64-unknown-linux-gnu]
- Suite(test::tests/codegen-units)
[Test] test::Coverage
targets: [aarch64-unknown-linux-gnu]
- Suite(test::tests/coverage)
[Test] test::CoverageRunRustdoc
targets: [x86_64-unknown-linux-gnu]
- Suite(test::tests/coverage-run-rustdoc)
[Test] test::Crashes
targets: [aarch64-unknown-linux-gnu]
- Suite(test::tests/crashes)
[Test] test::Debuginfo
targets: [aarch64-unknown-linux-gnu]
- Suite(test::tests/debuginfo)
[Test] test::Incremental
targets: [aarch64-unknown-linux-gnu]
- Suite(test::tests/incremental)
[Test] test::MirOpt
targets: [aarch64-unknown-linux-gnu]
- Suite(test::tests/mir-opt)
[Test] test::Pretty
targets: [x86_64-unknown-linux-gnu]
- Suite(test::tests/pretty)
[Test] test::RunMake
targets: [aarch64-unknown-linux-gnu]
- Suite(test::tests/run-make)
[Test] test::RunMakeCargo
targets: [aarch64-unknown-linux-gnu]
- Suite(test::tests/run-make-cargo)
[Test] test::Rustdoc
targets: [x86_64-unknown-linux-gnu]
- Suite(test::tests/rustdoc)
[Test] test::RustdocGUI
targets: [x86_64-unknown-linux-gnu]
- Suite(test::tests/rustdoc-gui)
[Test] test::RustdocJSNotStd
targets: [x86_64-unknown-linux-gnu]
- Suite(test::tests/rustdoc-js)
[Test] test::RustdocJSStd
targets: [x86_64-unknown-linux-gnu]
- Suite(test::tests/rustdoc-js-std)
[Test] test::RustdocJson
targets: [x86_64-unknown-linux-gnu]
- Suite(test::tests/rustdoc-json)
[Test] test::RustdocUi
targets: [x86_64-unknown-linux-gnu]
- Suite(test::tests/rustdoc-ui)
[Test] test::Ui
targets: [aarch64-unknown-linux-gnu]
- Suite(test::tests/ui)
[Test] test::UiFullDeps
targets: [x86_64-unknown-linux-gnu]
- Suite(test::tests/ui-fulldeps)

View file

@ -0,0 +1,61 @@
---
source: src/bootstrap/src/core/builder/cli_paths/tests.rs
expression: test tests --skip=coverage
---
[Test] test::AssemblyLlvm
targets: [aarch64-unknown-linux-gnu]
- Suite(test::tests/assembly-llvm)
[Test] test::CodegenLlvm
targets: [aarch64-unknown-linux-gnu]
- Suite(test::tests/codegen-llvm)
[Test] test::CodegenUnits
targets: [aarch64-unknown-linux-gnu]
- Suite(test::tests/codegen-units)
[Test] test::CoverageRunRustdoc
targets: [x86_64-unknown-linux-gnu]
- Suite(test::tests/coverage-run-rustdoc)
[Test] test::Crashes
targets: [aarch64-unknown-linux-gnu]
- Suite(test::tests/crashes)
[Test] test::Debuginfo
targets: [aarch64-unknown-linux-gnu]
- Suite(test::tests/debuginfo)
[Test] test::Incremental
targets: [aarch64-unknown-linux-gnu]
- Suite(test::tests/incremental)
[Test] test::MirOpt
targets: [aarch64-unknown-linux-gnu]
- Suite(test::tests/mir-opt)
[Test] test::Pretty
targets: [x86_64-unknown-linux-gnu]
- Suite(test::tests/pretty)
[Test] test::RunMake
targets: [aarch64-unknown-linux-gnu]
- Suite(test::tests/run-make)
[Test] test::RunMakeCargo
targets: [aarch64-unknown-linux-gnu]
- Suite(test::tests/run-make-cargo)
[Test] test::Rustdoc
targets: [x86_64-unknown-linux-gnu]
- Suite(test::tests/rustdoc)
[Test] test::RustdocGUI
targets: [x86_64-unknown-linux-gnu]
- Suite(test::tests/rustdoc-gui)
[Test] test::RustdocJSNotStd
targets: [x86_64-unknown-linux-gnu]
- Suite(test::tests/rustdoc-js)
[Test] test::RustdocJSStd
targets: [x86_64-unknown-linux-gnu]
- Suite(test::tests/rustdoc-js-std)
[Test] test::RustdocJson
targets: [x86_64-unknown-linux-gnu]
- Suite(test::tests/rustdoc-json)
[Test] test::RustdocUi
targets: [x86_64-unknown-linux-gnu]
- Suite(test::tests/rustdoc-ui)
[Test] test::Ui
targets: [aarch64-unknown-linux-gnu]
- Suite(test::tests/ui)
[Test] test::UiFullDeps
targets: [x86_64-unknown-linux-gnu]
- Suite(test::tests/ui-fulldeps)

View file

@ -0,0 +1,7 @@
---
source: src/bootstrap/src/core/builder/cli_paths/tests.rs
expression: test tests/ui
---
[Test] test::Ui
targets: [aarch64-unknown-linux-gnu]
- Suite(test::tests/ui)

View file

@ -0,0 +1,7 @@
---
source: src/bootstrap/src/core/builder/cli_paths/tests.rs
expression: test tidy
---
[Test] test::Tidy
targets: [x86_64-unknown-linux-gnu]
- Set({test::src/tools/tidy})

View file

@ -0,0 +1,7 @@
---
source: src/bootstrap/src/core/builder/cli_paths/tests.rs
expression: test tidyselftest
---
[Test] test::CrateBootstrap
targets: [x86_64-unknown-linux-gnu]
- Set({test::tidyselftest})

View file

@ -0,0 +1,7 @@
---
source: src/bootstrap/src/core/builder/cli_paths/tests.rs
expression: test ui
---
[Test] test::Ui
targets: [aarch64-unknown-linux-gnu]
- Suite(test::tests/ui)

View file

@ -0,0 +1,178 @@
use std::collections::{BTreeSet, HashSet};
use std::fs;
use std::path::{Path, PathBuf};
use std::sync::{Arc, Mutex};
use crate::Build;
use crate::core::builder::cli_paths::match_paths_to_steps_and_run;
use crate::core::builder::{Builder, StepDescription};
use crate::utils::tests::TestCtx;
fn render_steps_for_cli_args(args_str: &str) -> String {
// Split a single string into a step kind and subsequent arguments.
// E.g. "test ui" => ("test", &["ui"])
let args = args_str.split_ascii_whitespace().collect::<Vec<_>>();
let (kind, args) = args.split_first().unwrap();
// Arbitrary tuple to represent the host system.
let hosts = &["x86_64-unknown-linux-gnu"];
// Arbitrary tuple to represent the target system, which might not be the host.
let targets = &["aarch64-unknown-linux-gnu"];
let config = TestCtx::new()
.config(kind)
// `test::Bootstrap` is only run by default in CI, causing inconsistency.
.arg("--ci=false")
.args(args)
.hosts(hosts)
.targets(targets)
.create_config();
let mut build = Build::new(config);
// Some rustdoc test steps are only run by default if nodejs is
// configured/discovered, causing inconsistency.
build.config.nodejs = Some(PathBuf::from("node"));
let mut builder = Builder::new(&build);
// Tell the builder to log steps that it would run, instead of running them.
let mut buf = Arc::new(Mutex::new(String::new()));
let buf2 = Arc::clone(&buf);
builder.log_cli_step_for_tests = Some(Box::new(move |step_desc, pathsets, targets| {
use std::fmt::Write;
let mut buf = buf2.lock().unwrap();
let StepDescription { name, kind, .. } = step_desc;
// Strip boilerplate to make step names easier to read.
let name = name.strip_prefix("bootstrap::core::build_steps::").unwrap_or(name);
writeln!(buf, "[{kind:?}] {name}").unwrap();
writeln!(buf, " targets: {targets:?}").unwrap();
for pathset in pathsets {
// Normalize backslashes in paths, to avoid snapshot differences on Windows.
// FIXME(Zalathar): Doing a string-replace on <PathSet as Debug>
// is a bit unprincipled, but it's good enough for now.
let pathset_str = format!("{pathset:?}").replace('\\', "/");
writeln!(buf, " - {pathset_str}").unwrap();
}
}));
builder.execute_cli();
String::clone(&buf.lock().unwrap())
}
fn snapshot_test_inner(name: &str, args_str: &str) {
let mut settings = insta::Settings::clone_current();
// Use the test name as the snapshot filename, not its whole fully-qualified name.
settings.set_prepend_module_to_snapshot(false);
settings.bind(|| {
insta::assert_snapshot!(name, render_steps_for_cli_args(args_str), args_str);
});
}
/// Keep the snapshots directory tidy by forbidding `.snap` files that don't
/// correspond to a test name.
fn no_unused_snapshots_inner(known_test_names: &[&str]) {
let known_test_names = known_test_names.iter().copied().collect::<HashSet<&str>>();
let mut unexpected_file_names = BTreeSet::new();
// FIXME(Zalathar): Is there a better way to locate the snapshots dir?
for entry in walkdir::WalkDir::new("src/core/builder/cli_paths/snapshots")
.into_iter()
.map(Result::unwrap)
{
let meta = entry.metadata().unwrap();
if !meta.is_file() {
continue;
}
let name = entry.file_name().to_str().unwrap();
if let Some(name_stub) = name.strip_suffix(".snap")
&& !known_test_names.contains(name_stub)
{
unexpected_file_names.insert(name.to_owned());
}
}
assert!(
unexpected_file_names.is_empty(),
"Found snapshot files that don't correspond to a test name: {unexpected_file_names:#?}",
);
}
macro_rules! declare_tests {
(
$( ($name:ident, $args:literal) ),* $(,)?
) => {
$(
#[test]
fn $name() {
snapshot_test_inner(stringify!($name), $args);
}
)*
#[test]
fn no_unused_snapshots() {
let known_test_names = &[ $( stringify!($name), )* ];
no_unused_snapshots_inner(known_test_names);
}
};
}
// Snapshot tests for bootstrap's command-line path-to-step handling.
//
// To bless these tests as necessary, choose one:
// - Run `INSTA_UPDATE=always ./x test bootstrap`
// - Run `./x test bootstrap --bless`
// - Follow the instructions for `cargo-insta` in bootstrap's README.md
//
// These snapshot tests capture _current_ behavior, to prevent unintended
// changes or regressions. If the current behavior is wrong or undersirable,
// then any fix will necessarily have to re-bless the affected tests!
declare_tests!(
// tidy-alphabetical-start
(x_build, "build"),
(x_build_compiler, "build compiler"),
(x_build_compiletest, "build compiletest"),
(x_build_library, "build library"),
(x_build_llvm, "build llvm"),
(x_build_rustc, "build rustc"),
(x_build_rustc_llvm, "build rustc_llvm"),
(x_build_rustdoc, "build rustdoc"),
(x_build_sysroot, "build sysroot"),
(x_check, "check"),
(x_check_bootstrap, "check bootstrap"),
(x_check_compiler, "check compiler"),
(x_check_compiletest, "check compiletest"),
(x_check_compiletest_include_default_paths, "check compiletest --include-default-paths"),
(x_check_library, "check library"),
(x_check_rustc, "check rustc"),
(x_check_rustdoc, "check rustdoc"),
(x_dist, "dist"),
(x_test, "test"),
(x_test_coverage, "test coverage"),
(x_test_coverage_map, "test coverage-map"),
(x_test_coverage_run, "test coverage-run"),
// FIXME(Zalathar): Currently this doesn't actually skip the coverage-run tests!
(x_test_coverage_skip_coverage_run, "test coverage --skip=coverage-run"),
(x_test_debuginfo, "test debuginfo"),
(x_test_library, "test library"),
(x_test_librustdoc, "test librustdoc"),
(x_test_librustdoc_rustdoc, "test librustdoc rustdoc"),
(x_test_rustdoc, "test rustdoc"),
(x_test_skip_coverage, "test --skip=coverage"),
// FIXME(Zalathar): This doesn't skip the coverage-map or coverage-run tests.
(x_test_skip_tests, "test --skip=tests"),
// From `src/ci/docker/scripts/stage_2_test_set2.sh`.
(
x_test_skip_tests_etc,
"test --skip=tests --skip=coverage-map --skip=coverage-run --skip=library --skip=tidyselftest"
),
(x_test_tests, "test tests"),
(x_test_tests_skip_coverage, "test tests --skip=coverage"),
(x_test_tests_ui, "test tests/ui"),
(x_test_tidy, "test tidy"),
(x_test_tidyselftest, "test tidyselftest"),
(x_test_ui, "test ui"),
// tidy-alphabetical-end
);

View file

@ -66,6 +66,12 @@ pub struct Builder<'a> {
/// Cached list of submodules from self.build.src.
submodule_paths_cache: OnceLock<Vec<String>>,
/// When enabled by tests, this causes the top-level steps that _would_ be
/// executed to be logged instead. Used by snapshot tests of command-line
/// paths-to-steps handling.
#[expect(clippy::type_complexity)]
log_cli_step_for_tests: Option<Box<dyn Fn(&StepDescription, &[PathSet], &[TargetSelection])>>,
}
impl Deref for Builder<'_> {
@ -447,6 +453,13 @@ impl StepDescription {
// Determine the targets participating in this rule.
let targets = if self.is_host { &builder.hosts } else { &builder.targets };
// Log the step that's about to run, for snapshot tests.
if let Some(ref log_cli_step) = builder.log_cli_step_for_tests {
log_cli_step(self, &pathsets, targets);
// Return so that the step won't actually run in snapshot tests.
return;
}
for target in targets {
let run = RunConfig { builder, paths: pathsets.clone(), target: *target };
(self.make_run)(run);
@ -1079,6 +1092,7 @@ impl<'a> Builder<'a> {
time_spent_on_dependencies: Cell::new(Duration::new(0, 0)),
paths,
submodule_paths_cache: Default::default(),
log_cli_step_for_tests: None,
}
}