Skip to content

Commit

Permalink
Unrolled build for rust-lang#127098
Browse files Browse the repository at this point in the history
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
  • Loading branch information
rust-timer authored Jul 6, 2024
2 parents 51917e2 + 811532b commit 606f14f
Show file tree
Hide file tree
Showing 4 changed files with 552 additions and 150 deletions.
11 changes: 9 additions & 2 deletions src/tools/run-make-support/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -266,14 +266,14 @@ pub fn test_while_readonly<P: AsRef<Path>, F: FnOnce() + std::panic::UnwindSafe>
#[track_caller]
pub fn shallow_find_files<P: AsRef<Path>, F: Fn(&PathBuf) -> bool>(
path: P,
closure: F,
filter: F,
) -> Vec<PathBuf> {
let mut matching_files = Vec::new();
for entry in fs_wrapper::read_dir(path) {
let entry = entry.expect("failed to read directory entry.");
let path = entry.path();

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

/// Returns true if the filename at `path` is not in `expected`.
pub fn filename_not_in_denylist<P: AsRef<Path>>(path: P, expected: &[String]) -> bool {
path.as_ref()
.file_name()
.is_some_and(|name| !expected.contains(&name.to_str().unwrap().to_owned()))
}

/// Use `cygpath -w` on a path to get a Windows path string back. This assumes that `cygpath` is
/// available on the platform!
#[track_caller]
Expand Down
1 change: 0 additions & 1 deletion src/tools/tidy/src/allowed_run_make_makefiles.txt
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ run-make/no-alloc-shim/Makefile
run-make/no-builtins-attribute/Makefile
run-make/no-duplicate-libs/Makefile
run-make/obey-crate-type-flag/Makefile
run-make/output-type-permutations/Makefile
run-make/panic-abort-eh_frame/Makefile
run-make/pass-linker-flags-flavor/Makefile
run-make/pass-linker-flags-from-dep/Makefile
Expand Down
147 changes: 0 additions & 147 deletions tests/run-make/output-type-permutations/Makefile

This file was deleted.

Loading

0 comments on commit 606f14f

Please sign in to comment.