Skip to content

Commit 606f14f

Browse files
authored
Unrolled build for rust-lang#127098
Rollup merge of rust-lang#127098 - Oneirical:big-test-party, r=Kobzol,jieyouxu Migrate `output-type-permutations` `run-make` test to rmake Part of rust-lang#121876 and the associated [Google Summer of Code project](https://blog.rust-lang.org/2024/05/01/gsoc-2024-selected-projects.html). try-job: x86_64-msvc try-job: armhf-gnu try-job: aarch64-apple try-job: test-various
2 parents 51917e2 + 811532b commit 606f14f

File tree

4 files changed

+552
-150
lines changed

4 files changed

+552
-150
lines changed

src/tools/run-make-support/src/lib.rs

+9-2
Original file line numberDiff line numberDiff line change
@@ -266,14 +266,14 @@ pub fn test_while_readonly<P: AsRef<Path>, F: FnOnce() + std::panic::UnwindSafe>
266266
#[track_caller]
267267
pub fn shallow_find_files<P: AsRef<Path>, F: Fn(&PathBuf) -> bool>(
268268
path: P,
269-
closure: F,
269+
filter: F,
270270
) -> Vec<PathBuf> {
271271
let mut matching_files = Vec::new();
272272
for entry in fs_wrapper::read_dir(path) {
273273
let entry = entry.expect("failed to read directory entry.");
274274
let path = entry.path();
275275

276-
if path.is_file() && closure(&path) {
276+
if path.is_file() && filter(&path) {
277277
matching_files.push(path);
278278
}
279279
}
@@ -295,6 +295,13 @@ pub fn not_contains<P: AsRef<Path>>(path: P, expected: &str) -> bool {
295295
!path.as_ref().file_name().is_some_and(|name| name.to_str().unwrap().contains(expected))
296296
}
297297

298+
/// Returns true if the filename at `path` is not in `expected`.
299+
pub fn filename_not_in_denylist<P: AsRef<Path>>(path: P, expected: &[String]) -> bool {
300+
path.as_ref()
301+
.file_name()
302+
.is_some_and(|name| !expected.contains(&name.to_str().unwrap().to_owned()))
303+
}
304+
298305
/// Use `cygpath -w` on a path to get a Windows path string back. This assumes that `cygpath` is
299306
/// available on the platform!
300307
#[track_caller]

src/tools/tidy/src/allowed_run_make_makefiles.txt

-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ run-make/no-alloc-shim/Makefile
100100
run-make/no-builtins-attribute/Makefile
101101
run-make/no-duplicate-libs/Makefile
102102
run-make/obey-crate-type-flag/Makefile
103-
run-make/output-type-permutations/Makefile
104103
run-make/panic-abort-eh_frame/Makefile
105104
run-make/pass-linker-flags-flavor/Makefile
106105
run-make/pass-linker-flags-from-dep/Makefile

tests/run-make/output-type-permutations/Makefile

-147
This file was deleted.

0 commit comments

Comments
 (0)