diff --git a/src/bootstrap/src/core/build_steps/test.rs b/src/bootstrap/src/core/build_steps/test.rs index e1b3ff92a07b8..94ec911bf2730 100644 --- a/src/bootstrap/src/core/build_steps/test.rs +++ b/src/bootstrap/src/core/build_steps/test.rs @@ -3395,6 +3395,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); } diff --git a/src/bootstrap/src/core/builder/cli_paths.rs b/src/bootstrap/src/core/builder/cli_paths.rs index aa81c4684eab3..fef1979465e8b 100644 --- a/src/bootstrap/src/core/builder/cli_paths.rs +++ b/src/bootstrap/src/core/builder/cli_paths.rs @@ -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` diff --git a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_build.snap b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_build.snap new file mode 100644 index 0000000000000..f8c6deccb3bcb --- /dev/null +++ b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_build.snap @@ -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}) diff --git a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_build_compiler.snap b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_build_compiler.snap new file mode 100644 index 0000000000000..721ecaf4c487e --- /dev/null +++ b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_build_compiler.snap @@ -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}) diff --git a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_build_compiletest.snap b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_build_compiletest.snap new file mode 100644 index 0000000000000..97f60bfa0370b --- /dev/null +++ b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_build_compiletest.snap @@ -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}) diff --git a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_build_llvm.snap b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_build_llvm.snap new file mode 100644 index 0000000000000..f4764a5279a71 --- /dev/null +++ b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_build_llvm.snap @@ -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}) diff --git a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_build_rustc.snap b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_build_rustc.snap new file mode 100644 index 0000000000000..a6d3d13154ed4 --- /dev/null +++ b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_build_rustc.snap @@ -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}) diff --git a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_build_rustc_llvm.snap b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_build_rustc_llvm.snap new file mode 100644 index 0000000000000..30f598ddb7816 --- /dev/null +++ b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_build_rustc_llvm.snap @@ -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}) diff --git a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_build_rustdoc.snap b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_build_rustdoc.snap new file mode 100644 index 0000000000000..9a98092d714f4 --- /dev/null +++ b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_build_rustdoc.snap @@ -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}) diff --git a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_check.snap b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_check.snap new file mode 100644 index 0000000000000..0fe26fac57fc5 --- /dev/null +++ b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_check.snap @@ -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}) diff --git a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_check_bootstrap.snap b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_check_bootstrap.snap new file mode 100644 index 0000000000000..a746783b3909c --- /dev/null +++ b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_check_bootstrap.snap @@ -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}) diff --git a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_check_compiler.snap b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_check_compiler.snap new file mode 100644 index 0000000000000..71d9c0fafb809 --- /dev/null +++ b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_check_compiler.snap @@ -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}) diff --git a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_check_compiletest.snap b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_check_compiletest.snap new file mode 100644 index 0000000000000..8f772bc55b82b --- /dev/null +++ b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_check_compiletest.snap @@ -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}) diff --git a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_check_compiletest_include_default_paths.snap b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_check_compiletest_include_default_paths.snap new file mode 100644 index 0000000000000..dae515c67ec6d --- /dev/null +++ b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_check_compiletest_include_default_paths.snap @@ -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}) diff --git a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_check_library.snap b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_check_library.snap new file mode 100644 index 0000000000000..1a41aa98555b6 --- /dev/null +++ b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_check_library.snap @@ -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}) diff --git a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_check_rustc.snap b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_check_rustc.snap new file mode 100644 index 0000000000000..9aed81d2c22d6 --- /dev/null +++ b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_check_rustc.snap @@ -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}) diff --git a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_check_rustdoc.snap b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_check_rustdoc.snap new file mode 100644 index 0000000000000..0a6b84f803c13 --- /dev/null +++ b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_check_rustdoc.snap @@ -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}) diff --git a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_dist.snap b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_dist.snap new file mode 100644 index 0000000000000..2fc8ca143dd0d --- /dev/null +++ b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_dist.snap @@ -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}) diff --git a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test.snap b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test.snap new file mode 100644 index 0000000000000..b9cb897a75697 --- /dev/null +++ b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test.snap @@ -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) diff --git a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_coverage.snap b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_coverage.snap new file mode 100644 index 0000000000000..3b78d842dd704 --- /dev/null +++ b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_coverage.snap @@ -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) diff --git a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_coverage_map.snap b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_coverage_map.snap new file mode 100644 index 0000000000000..fd79a0c8ad6ac --- /dev/null +++ b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_coverage_map.snap @@ -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}) diff --git a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_coverage_run.snap b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_coverage_run.snap new file mode 100644 index 0000000000000..8ffadc424348e --- /dev/null +++ b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_coverage_run.snap @@ -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}) diff --git a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_coverage_skip_coverage_run.snap b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_coverage_skip_coverage_run.snap new file mode 100644 index 0000000000000..76da4c82151ad --- /dev/null +++ b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_coverage_skip_coverage_run.snap @@ -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) diff --git a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_debuginfo.snap b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_debuginfo.snap new file mode 100644 index 0000000000000..d462e1f7917d4 --- /dev/null +++ b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_debuginfo.snap @@ -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) diff --git a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_librustdoc.snap b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_librustdoc.snap new file mode 100644 index 0000000000000..bd217dbe692a4 --- /dev/null +++ b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_librustdoc.snap @@ -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}) diff --git a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_librustdoc_rustdoc.snap b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_librustdoc_rustdoc.snap new file mode 100644 index 0000000000000..6522a7e8edaf7 --- /dev/null +++ b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_librustdoc_rustdoc.snap @@ -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}) diff --git a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_rustdoc.snap b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_rustdoc.snap new file mode 100644 index 0000000000000..337ad33fe35fa --- /dev/null +++ b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_rustdoc.snap @@ -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}) diff --git a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_skip_coverage.snap b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_skip_coverage.snap new file mode 100644 index 0000000000000..04253bba5ef7c --- /dev/null +++ b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_skip_coverage.snap @@ -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) diff --git a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_skip_tests.snap b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_skip_tests.snap new file mode 100644 index 0000000000000..f10589548f665 --- /dev/null +++ b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_skip_tests.snap @@ -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}) diff --git a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_skip_tests_etc.snap b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_skip_tests_etc.snap new file mode 100644 index 0000000000000..65e05dfaef2d9 --- /dev/null +++ b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_skip_tests_etc.snap @@ -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}) diff --git a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_tests.snap b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_tests.snap new file mode 100644 index 0000000000000..b38af13d49c32 --- /dev/null +++ b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_tests.snap @@ -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) diff --git a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_tests_skip_coverage.snap b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_tests_skip_coverage.snap new file mode 100644 index 0000000000000..6a158ea62bb37 --- /dev/null +++ b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_tests_skip_coverage.snap @@ -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) diff --git a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_tests_ui.snap b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_tests_ui.snap new file mode 100644 index 0000000000000..1288af72fd5d2 --- /dev/null +++ b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_tests_ui.snap @@ -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) diff --git a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_tidy.snap b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_tidy.snap new file mode 100644 index 0000000000000..b2bebf39e120c --- /dev/null +++ b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_tidy.snap @@ -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}) diff --git a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_tidyselftest.snap b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_tidyselftest.snap new file mode 100644 index 0000000000000..945c82ef1cd02 --- /dev/null +++ b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_tidyselftest.snap @@ -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}) diff --git a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_ui.snap b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_ui.snap new file mode 100644 index 0000000000000..5c764959cdaef --- /dev/null +++ b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_ui.snap @@ -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) diff --git a/src/bootstrap/src/core/builder/cli_paths/tests.rs b/src/bootstrap/src/core/builder/cli_paths/tests.rs new file mode 100644 index 0000000000000..071cfa0e86e3f --- /dev/null +++ b/src/bootstrap/src/core/builder/cli_paths/tests.rs @@ -0,0 +1,171 @@ +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::>(); + 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 { + writeln!(buf, " - {pathset:?}").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::>(); + + 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_llvm, "build llvm"), + (x_build_rustc, "build rustc"), + (x_build_rustc_llvm, "build rustc_llvm"), + (x_build_rustdoc, "build rustdoc"), + (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_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 +); diff --git a/src/bootstrap/src/core/builder/mod.rs b/src/bootstrap/src/core/builder/mod.rs index c7490c7072bda..c5db8f2c2a1a8 100644 --- a/src/bootstrap/src/core/builder/mod.rs +++ b/src/bootstrap/src/core/builder/mod.rs @@ -66,6 +66,12 @@ pub struct Builder<'a> { /// Cached list of submodules from self.build.src. submodule_paths_cache: OnceLock>, + + /// 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>, } 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); @@ -1078,6 +1091,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, } }