about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-05-26 13:43:05 +0200
committerGitHub <noreply@github.com>2024-05-26 13:43:05 +0200
commite346404fca4f2898ed57f280d9c176a832cf9538 (patch)
tree3aef34d3be2aa3c7dfc235939c665524c6e1b74a /src
parent5fe554350208b72cb8b66ce39bf0b92b1bba6edd (diff)
parentd0b45a951bddc4ed46cbbaff15818065795d0c2b (diff)
Rollup merge of #125307 - workingjubilee:uproot-entry-limit, 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.
Diffstat (limited to 'src')
-rw-r--r--src/tools/tidy/src/ui_tests.rs15
1 files changed, 2 insertions, 13 deletions
diff --git a/src/tools/tidy/src/ui_tests.rs b/src/tools/tidy/src/ui_tests.rs
index e1c6c9a2dac..37324639edf 100644
--- a/src/tools/tidy/src/ui_tests.rs
+++ b/src/tools/tidy/src/ui_tests.rs
@@ -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
@@ -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)
@@ -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,