Skip to content

Commit 9bcbe29

Browse files
committed
Lazily patch all test projects
1 parent e0a6914 commit 9bcbe29

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

build_system/prepare.rs

-4
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@ pub(crate) fn prepare(dirs: &Dirs, rustc: &Path) {
1818

1919
// FIXME do this on the fly?
2020
prepare_stdlib(dirs, rustc);
21-
22-
super::tests::RAND_REPO.patch(dirs);
23-
super::tests::REGEX_REPO.patch(dirs);
24-
super::tests::PORTABLE_SIMD_REPO.patch(dirs);
2521
}
2622

2723
fn prepare_stdlib(dirs: &Dirs, rustc: &Path) {

build_system/tests.rs

+8
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,8 @@ static LIBCORE_TESTS: CargoProject = CargoProject::new(&LIBCORE_TESTS_SRC, "core
133133

134134
const EXTENDED_SYSROOT_SUITE: &[TestCase] = &[
135135
TestCase::custom("test.rust-random/rand", &|runner| {
136+
RAND_REPO.patch(&runner.dirs);
137+
136138
RAND.clean(&runner.dirs);
137139

138140
if runner.is_native {
@@ -168,6 +170,8 @@ const EXTENDED_SYSROOT_SUITE: &[TestCase] = &[
168170
}
169171
}),
170172
TestCase::custom("test.regex-shootout-regex-dna", &|runner| {
173+
REGEX_REPO.patch(&runner.dirs);
174+
171175
REGEX.clean(&runner.dirs);
172176

173177
let mut build_cmd = REGEX.build(&runner.target_compiler, &runner.dirs);
@@ -200,6 +204,8 @@ const EXTENDED_SYSROOT_SUITE: &[TestCase] = &[
200204
}
201205
}),
202206
TestCase::custom("test.regex", &|runner| {
207+
REGEX_REPO.patch(&runner.dirs);
208+
203209
REGEX.clean(&runner.dirs);
204210

205211
if runner.is_native {
@@ -216,6 +222,8 @@ const EXTENDED_SYSROOT_SUITE: &[TestCase] = &[
216222
}
217223
}),
218224
TestCase::custom("test.portable-simd", &|runner| {
225+
PORTABLE_SIMD_REPO.patch(&runner.dirs);
226+
219227
PORTABLE_SIMD.clean(&runner.dirs);
220228

221229
let mut build_cmd = PORTABLE_SIMD.build(&runner.target_compiler, &runner.dirs);

0 commit comments

Comments
 (0)