Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/bootstrap/src/core/build_steps/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
3 changes: 3 additions & 0 deletions src/bootstrap/src/core/builder/cli_paths.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
23 changes: 23 additions & 0 deletions src/bootstrap/src/core/builder/cli_paths/snapshots/x_build.snap
Original file line number Diff line number Diff line change
@@ -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})
Original file line number Diff line number Diff line change
@@ -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})
Original file line number Diff line number Diff line change
@@ -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})
Original file line number Diff line number Diff line change
@@ -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})
Original file line number Diff line number Diff line change
@@ -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})
Original file line number Diff line number Diff line change
@@ -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})
Original file line number Diff line number Diff line change
@@ -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})
134 changes: 134 additions & 0 deletions src/bootstrap/src/core/builder/cli_paths/snapshots/x_check.snap
Original file line number Diff line number Diff line change
@@ -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})
Original file line number Diff line number Diff line change
@@ -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})
Original file line number Diff line number Diff line change
@@ -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})
Loading
Loading