Skip to content

Commit a085b68

Browse files
committed
Add bootstrap step for stdarch-verify
* add bootstrap for stdarch-verify * update bootstrap snapshot * make default * update snapshots
1 parent fe7294f commit a085b68

File tree

6 files changed

+65
-0
lines changed

6 files changed

+65
-0
lines changed

src/bootstrap/src/core/build_steps/test.rs

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -903,6 +903,58 @@ NOTE: if you're sure you want to do this, please open an issue as to why. In the
903903
}
904904
}
905905

906+
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
907+
pub struct StdarchVerify {
908+
build_compiler: Compiler,
909+
target: TargetSelection,
910+
}
911+
912+
impl Step for StdarchVerify {
913+
type Output = ();
914+
const IS_HOST: bool = true;
915+
916+
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
917+
run.path("library/stdarch/crates/stdarch-verify")
918+
}
919+
920+
fn is_default_step(_builder: &Builder<'_>) -> bool {
921+
true
922+
}
923+
924+
fn make_run(run: RunConfig<'_>) {
925+
let builder = run.builder;
926+
let build_compiler = get_compiler_to_test(builder, run.target);
927+
builder.ensure(StdarchVerify { build_compiler, target: run.target });
928+
}
929+
930+
fn run(self, builder: &Builder<'_>) {
931+
let build_compiler = self.build_compiler;
932+
let target = self.target;
933+
934+
builder.std(build_compiler, target);
935+
936+
let cargo = tool::prepare_tool_cargo(
937+
builder,
938+
build_compiler,
939+
Mode::ToolStd,
940+
target,
941+
Kind::Test,
942+
"library/stdarch/crates/stdarch-verify",
943+
SourceType::InTree,
944+
&[],
945+
);
946+
947+
run_cargo_test(
948+
cargo,
949+
&[],
950+
&["stdarch-verify".to_string()],
951+
Some("stdarch-verify"),
952+
target,
953+
builder,
954+
);
955+
}
956+
}
957+
906958
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
907959
pub struct Clippy {
908960
compilers: RustcPrivateCompilers,

src/bootstrap/src/core/builder/cli_paths/snapshots/x_test.snap

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,9 @@ expression: test
182182
[Test] test::RustcBook
183183
targets: [x86_64-unknown-linux-gnu]
184184
- Set({test::src/doc/rustc})
185+
[Test] test::StdarchVerify
186+
targets: [x86_64-unknown-linux-gnu]
187+
- Set({test::library/stdarch/crates/stdarch-verify})
185188
[Test] test::RustdocJSStd
186189
targets: [x86_64-unknown-linux-gnu]
187190
- Suite(test::tests/rustdoc-js-std)

src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_library.snap

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,6 @@ expression: test library
1818
- Set({test::library/sysroot})
1919
- Set({test::library/test})
2020
- Set({test::library/unwind})
21+
[Test] test::StdarchVerify
22+
targets: [x86_64-unknown-linux-gnu]
23+
- Set({test::library/stdarch/crates/stdarch-verify})

src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_skip_coverage.snap

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,9 @@ expression: test --skip=coverage
181181
[Test] test::RustcBook
182182
targets: [x86_64-unknown-linux-gnu]
183183
- Set({test::src/doc/rustc})
184+
[Test] test::StdarchVerify
185+
targets: [x86_64-unknown-linux-gnu]
186+
- Set({test::library/stdarch/crates/stdarch-verify})
184187
[Test] test::RustdocJSStd
185188
targets: [x86_64-unknown-linux-gnu]
186189
- Suite(test::tests/rustdoc-js-std)

src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_skip_tests.snap

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,9 @@ expression: test --skip=tests
145145
[Test] test::RustcBook
146146
targets: [x86_64-unknown-linux-gnu]
147147
- Set({test::src/doc/rustc})
148+
[Test] test::StdarchVerify
149+
targets: [x86_64-unknown-linux-gnu]
150+
- Set({test::library/stdarch/crates/stdarch-verify})
148151
[Test] test::RustdocTheme
149152
targets: [x86_64-unknown-linux-gnu]
150153
- Set({test::src/tools/rustdoc-themes})

src/bootstrap/src/core/builder/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -894,6 +894,7 @@ impl<'a> Builder<'a> {
894894
test::CargoMiri,
895895
test::Clippy,
896896
test::CompiletestTest,
897+
test::StdarchVerify,
897898
test::CrateRunMakeSupport,
898899
test::CrateBuildHelper,
899900
test::RustdocJSStd,

0 commit comments

Comments
 (0)