Skip to content

Commit f06b9a5

Browse files
committed
Add bootstrap step for stdarch-verify and update license metadata
1 parent a3e96d8 commit f06b9a5

7 files changed

Lines changed: 70 additions & 5 deletions

File tree

license-metadata.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"license": {
2929
"copyright": [
3030
"2007-2011 Atheros Communications Inc",
31-
"2011-2012,2017 Qualcomm Atheros, Inc",
31+
"2011-2012, 2017 Qualcomm Atheros, Inc",
3232
"2016-2017 Erik Stromdahl <erik.stromdahl@gmail.com>"
3333
],
3434
"spdx": "ISC"
@@ -124,8 +124,8 @@
124124
],
125125
"license": {
126126
"copyright": [
127-
"2014, Mozilla Foundation",
128-
"2014, Telefonica S.A"
127+
"2014 Mozilla Foundation",
128+
"2014 Telefonica S.A"
129129
],
130130
"spdx": "OFL-1.1"
131131
},
@@ -148,7 +148,7 @@
148148
],
149149
"license": {
150150
"copyright": [
151-
"2010, 2012, 2014-2023, Adobe Systems Incorporated"
151+
"2010, 2012, 2014-2023 Adobe Systems Incorporated"
152152
],
153153
"spdx": "OFL-1.1"
154154
},
@@ -271,4 +271,4 @@
271271
],
272272
"type": "root"
273273
}
274-
}
274+
}

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

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

907+
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
908+
pub struct StdarchVerify {
909+
build_compiler: Compiler,
910+
target: TargetSelection,
911+
}
912+
913+
impl Step for StdarchVerify {
914+
type Output = ();
915+
const IS_HOST: bool = true;
916+
917+
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
918+
run.path("library/stdarch/crates/stdarch-verify")
919+
}
920+
921+
fn is_default_step(_builder: &Builder<'_>) -> bool {
922+
true
923+
}
924+
925+
fn make_run(run: RunConfig<'_>) {
926+
let builder = run.builder;
927+
let build_compiler = get_compiler_to_test(builder, run.target);
928+
builder.ensure(StdarchVerify { build_compiler, target: run.target });
929+
}
930+
931+
fn run(self, builder: &Builder<'_>) {
932+
let build_compiler = self.build_compiler;
933+
let target = self.target;
934+
935+
builder.std(build_compiler, target);
936+
937+
let cargo = tool::prepare_tool_cargo(
938+
builder,
939+
build_compiler,
940+
Mode::ToolStd,
941+
target,
942+
Kind::Test,
943+
"library/stdarch/crates/stdarch-verify",
944+
SourceType::InTree,
945+
&[],
946+
);
947+
948+
run_cargo_test(
949+
cargo,
950+
&[],
951+
&["stdarch-verify".to_string()],
952+
Some("stdarch-verify"),
953+
target,
954+
builder,
955+
);
956+
}
957+
}
958+
907959
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
908960
pub struct Clippy {
909961
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
@@ -181,6 +181,9 @@ expression: test
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_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
@@ -180,6 +180,9 @@ expression: test --skip=coverage
180180
[Test] test::RustcBook
181181
targets: [x86_64-unknown-linux-gnu]
182182
- Set({test::src/doc/rustc})
183+
[Test] test::StdarchVerify
184+
targets: [x86_64-unknown-linux-gnu]
185+
- Set({test::library/stdarch/crates/stdarch-verify})
183186
[Test] test::RustdocJSStd
184187
targets: [x86_64-unknown-linux-gnu]
185188
- 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
@@ -144,6 +144,9 @@ expression: test --skip=tests
144144
[Test] test::RustcBook
145145
targets: [x86_64-unknown-linux-gnu]
146146
- Set({test::src/doc/rustc})
147+
[Test] test::StdarchVerify
148+
targets: [x86_64-unknown-linux-gnu]
149+
- Set({test::library/stdarch/crates/stdarch-verify})
147150
[Test] test::RustdocTheme
148151
targets: [x86_64-unknown-linux-gnu]
149152
- 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
@@ -910,6 +910,7 @@ impl<'a> Builder<'a> {
910910
test::CargoMiri,
911911
test::Clippy,
912912
test::CompiletestTest,
913+
test::StdarchVerify,
913914
test::CrateRunMakeSupport,
914915
test::CrateBuildHelper,
915916
test::RustdocJSStd,

0 commit comments

Comments
 (0)