Skip to content

Commit

Permalink
Rollup merge of rust-lang#125307 - workingjubilee:uproot-entry-limit,…
Browse files Browse the repository at this point in the history
… r=Mark-Simulacrum

tidy: stop special-casing tests/ui entry limit

It is genuinely more annoying to have this error, now that this value is below the general `ENTRY_LIMIT` cap, when one is trying to clean out tests from tests/ui! This code has served its purpose well, let it rest now rather than force it to continue haunting us.
  • Loading branch information
fmease authored May 26, 2024
2 parents f6e46b4 + d0b45a9 commit 6f729a3
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions src/tools/tidy/src/ui_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ const ENTRY_LIMIT: usize = 900;
// FIXME: The following limits should be reduced eventually.

const ISSUES_ENTRY_LIMIT: usize = 1676;
const ROOT_ENTRY_LIMIT: usize = 757;

const EXPECTED_TEST_FILE_EXTENSIONS: &[&str] = &[
"rs", // test source files
Expand Down Expand Up @@ -63,14 +62,10 @@ fn check_entries(tests_path: &Path, bad: &mut bool) {
}
}

let (mut max, mut max_root, mut max_issues) = (0usize, 0usize, 0usize);
let (mut max, mut max_issues) = (0usize, 0usize);
for (dir_path, count) in directories {
// Use special values for these dirs.
let is_root = tests_path.join("ui") == dir_path;
let is_issues_dir = tests_path.join("ui/issues") == dir_path;
let (limit, maxcnt) = if is_root {
(ROOT_ENTRY_LIMIT, &mut max_root)
} else if is_issues_dir {
let (limit, maxcnt) = if is_issues_dir {
(ISSUES_ENTRY_LIMIT, &mut max_issues)
} else {
(ENTRY_LIMIT, &mut max)
Expand All @@ -87,12 +82,6 @@ fn check_entries(tests_path: &Path, bad: &mut bool) {
);
}
}
if ROOT_ENTRY_LIMIT > max_root {
tidy_error!(
bad,
"`ROOT_ENTRY_LIMIT` is too high (is {ROOT_ENTRY_LIMIT}, should be {max_root})"
);
}
if ISSUES_ENTRY_LIMIT > max_issues {
tidy_error!(
bad,
Expand Down

0 comments on commit 6f729a3

Please sign in to comment.