diff options
| author | 许杰友 Jieyou Xu (Joe) <39484203+jieyouxu@users.noreply.github.com> | 2024-08-26 18:19:10 +0800 |
|---|---|---|
| committer | 许杰友 Jieyou Xu (Joe) <39484203+jieyouxu@users.noreply.github.com> | 2024-08-26 18:19:10 +0800 |
| commit | 92b10819efecc0a2a638050d8fc8c9b2d2ad14d8 (patch) | |
| tree | 13c5033d46d2de4d487bee7f0c6264df30fec941 | |
| parent | 3f121b9461cce02a703a0e7e450568849dfaa074 (diff) | |
| download | rust-92b10819efecc0a2a638050d8fc8c9b2d2ad14d8.tar.gz rust-92b10819efecc0a2a638050d8fc8c9b2d2ad14d8.zip | |
tidy: skip revision llvm-components check for run-make tests
Since run-make tests do not support revisions.
| -rw-r--r-- | src/tools/tidy/src/target_specific_tests.rs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/tools/tidy/src/target_specific_tests.rs b/src/tools/tidy/src/target_specific_tests.rs index 8be27d1e117..c1032b19f97 100644 --- a/src/tools/tidy/src/target_specific_tests.rs +++ b/src/tools/tidy/src/target_specific_tests.rs @@ -36,8 +36,8 @@ struct RevisionInfo<'a> { llvm_components: Option<Vec<&'a str>>, } -pub fn check(path: &Path, bad: &mut bool) { - crate::walk::walk(path, |path, _is_dir| filter_not_rust(path), &mut |entry, content| { +pub fn check(tests_path: &Path, bad: &mut bool) { + crate::walk::walk(tests_path, |path, _is_dir| filter_not_rust(path), &mut |entry, content| { let file = entry.path().display(); let mut header_map = BTreeMap::new(); iter_header(content, &mut |HeaderLine { revision, directive, .. }| { @@ -65,6 +65,12 @@ pub fn check(path: &Path, bad: &mut bool) { } } }); + + // Skip run-make tests as revisions are not supported. + if entry.path().strip_prefix(tests_path).is_ok_and(|rest| rest.starts_with("run-make")) { + return; + } + for (rev, RevisionInfo { target_arch, llvm_components }) in &header_map { let rev = rev.unwrap_or("[unspecified]"); match (target_arch, llvm_components) { |
