diff options
| author | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2023-05-29 11:51:37 +0000 |
|---|---|---|
| committer | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2023-06-13 16:39:59 +0000 |
| commit | 67f9fe6863cede6ca5f41b938e4f3188feb24c65 (patch) | |
| tree | f0ab7e7aaea6bc0fda9f687364d1c112e5437a84 | |
| parent | 3baee66f9b0cd440d9288ce757cc6caec93eeb67 (diff) | |
| download | rust-67f9fe6863cede6ca5f41b938e4f3188feb24c65.tar.gz rust-67f9fe6863cede6ca5f41b938e4f3188feb24c65.zip | |
Lazily patch all test projects
| -rw-r--r-- | build_system/prepare.rs | 4 | ||||
| -rw-r--r-- | build_system/tests.rs | 8 |
2 files changed, 8 insertions, 4 deletions
diff --git a/build_system/prepare.rs b/build_system/prepare.rs index bc249f4cdab..115575bff51 100644 --- a/build_system/prepare.rs +++ b/build_system/prepare.rs @@ -18,10 +18,6 @@ pub(crate) fn prepare(dirs: &Dirs, rustc: &Path) { // FIXME do this on the fly? prepare_stdlib(dirs, rustc); - - super::tests::RAND_REPO.patch(dirs); - super::tests::REGEX_REPO.patch(dirs); - super::tests::PORTABLE_SIMD_REPO.patch(dirs); } fn prepare_stdlib(dirs: &Dirs, rustc: &Path) { diff --git a/build_system/tests.rs b/build_system/tests.rs index 5502e2a23c6..d104efd61e5 100644 --- a/build_system/tests.rs +++ b/build_system/tests.rs @@ -133,6 +133,8 @@ static LIBCORE_TESTS: CargoProject = CargoProject::new(&LIBCORE_TESTS_SRC, "core const EXTENDED_SYSROOT_SUITE: &[TestCase] = &[ TestCase::custom("test.rust-random/rand", &|runner| { + RAND_REPO.patch(&runner.dirs); + RAND.clean(&runner.dirs); if runner.is_native { @@ -168,6 +170,8 @@ const EXTENDED_SYSROOT_SUITE: &[TestCase] = &[ } }), TestCase::custom("test.regex-shootout-regex-dna", &|runner| { + REGEX_REPO.patch(&runner.dirs); + REGEX.clean(&runner.dirs); let mut build_cmd = REGEX.build(&runner.target_compiler, &runner.dirs); @@ -200,6 +204,8 @@ const EXTENDED_SYSROOT_SUITE: &[TestCase] = &[ } }), TestCase::custom("test.regex", &|runner| { + REGEX_REPO.patch(&runner.dirs); + REGEX.clean(&runner.dirs); if runner.is_native { @@ -216,6 +222,8 @@ const EXTENDED_SYSROOT_SUITE: &[TestCase] = &[ } }), TestCase::custom("test.portable-simd", &|runner| { + PORTABLE_SIMD_REPO.patch(&runner.dirs); + PORTABLE_SIMD.clean(&runner.dirs); let mut build_cmd = PORTABLE_SIMD.build(&runner.target_compiler, &runner.dirs); |
