diff options
| -rw-r--r-- | src/tools/tidy/src/main.rs | 2 | ||||
| -rw-r--r-- | src/tools/tidy/src/run_make_tests.rs | 6 |
2 files changed, 3 insertions, 5 deletions
diff --git a/src/tools/tidy/src/main.rs b/src/tools/tidy/src/main.rs index c823d46b2bd..bf5c0afdbb0 100644 --- a/src/tools/tidy/src/main.rs +++ b/src/tools/tidy/src/main.rs @@ -103,7 +103,7 @@ fn main() { check!(tests_revision_unpaired_stdout_stderr, &tests_path); check!(debug_artifacts, &tests_path); check!(ui_tests, &root_path, bless); - check!(run_make_tests, &root_path, bless); + check!(run_make_tests, &tests_path, &src_path, bless); check!(mir_opt_tests, &tests_path, bless); check!(rustdoc_gui_tests, &tests_path); check!(rustdoc_css_themes, &librustdoc_path); diff --git a/src/tools/tidy/src/run_make_tests.rs b/src/tools/tidy/src/run_make_tests.rs index 0231ac0939e..2d34bfc28f4 100644 --- a/src/tools/tidy/src/run_make_tests.rs +++ b/src/tools/tidy/src/run_make_tests.rs @@ -5,9 +5,7 @@ use std::fs::File; use std::io::Write; use std::path::{Path, PathBuf}; -pub fn check(root_path: &Path, bless: bool, bad: &mut bool) { - let tests_path = &root_path.join("tests"); - +pub fn check(tests_path: &Path, src_path: &Path, bless: bool, bad: &mut bool) { let allowed_makefiles = { // We use `include!` here which includes the file as Rust syntax because we want to have // a comment that discourages people from adding entries to @@ -76,7 +74,7 @@ pub fn check(root_path: &Path, bless: bool, bad: &mut bool) { */ [ "#; - let tidy_src = root_path.join("src").join("tools").join("tidy").join("src"); + let tidy_src = src_path.join("tools").join("tidy").join("src"); let org_file_path = tidy_src.join("expected_run_make_makefiles.txt"); let temp_file_path = tidy_src.join("blessed_expected_run_make_makefiles.txt"); let mut temp_file = t!(File::create_new(&temp_file_path)); |
