diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-08-31 20:36:23 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-31 20:36:23 +0200 |
| commit | d354d4ddd760363e84646d3b9d72cbbd790c3148 (patch) | |
| tree | d18419059fe07e12a2f8b15d43cfc6c117d65a46 /src/tools/tidy | |
| parent | 71240e4805393ed19e7872fdea12a90c84ebf21d (diff) | |
| parent | beaf9d1c14122a55d71717560162c8123f5f23ea (diff) | |
| download | rust-d354d4ddd760363e84646d3b9d72cbbd790c3148.tar.gz rust-d354d4ddd760363e84646d3b9d72cbbd790c3148.zip | |
Rollup merge of #129605 - jieyouxu:needs-llvm-components, r=Mark-Simulacrum
Add missing `needs-llvm-components` directives for run-make tests that need target-specific codegen Without suitable `needs-llvm-components` directives, some run-make tests exercising target-specific codegen can fail if the LLVM used is built without the necessary components. Currently, the list is: ``` tests\run-make\print-target-list tests\run-make\print-to-output tests\run-make\print-cfg tests\run-make\target-without-atomic-cas ``` This PR also skips tidy checks for revisions and `needs-llvm-components` for run-make tests since revisions are not supported. Fixes #129390. Fixes #127895. cc ``@petrochenkov`` who noticed this, thanks! Would be great if you could confirm that this fixes the test errors for you locally.
Diffstat (limited to 'src/tools/tidy')
| -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) { |
