Skip to content

Commit 7cf69a8

Browse files
committed
Pass tests_path and src_path separately
1 parent ec25a42 commit 7cf69a8

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/tools/tidy/src/main.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ fn main() {
103103
check!(tests_revision_unpaired_stdout_stderr, &tests_path);
104104
check!(debug_artifacts, &tests_path);
105105
check!(ui_tests, &root_path, bless);
106-
check!(run_make_tests, &root_path, bless);
106+
check!(run_make_tests, &tests_path, &src_path, bless);
107107
check!(mir_opt_tests, &tests_path, bless);
108108
check!(rustdoc_gui_tests, &tests_path);
109109
check!(rustdoc_css_themes, &librustdoc_path);

src/tools/tidy/src/run_make_tests.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@ use std::fs::File;
55
use std::io::Write;
66
use std::path::{Path, PathBuf};
77

8-
pub fn check(root_path: &Path, bless: bool, bad: &mut bool) {
9-
let tests_path = &root_path.join("tests");
10-
8+
pub fn check(tests_path: &Path, src_path: &Path, bless: bool, bad: &mut bool) {
119
let allowed_makefiles = {
1210
// We use `include!` here which includes the file as Rust syntax because we want to have
1311
// a comment that discourages people from adding entries to
@@ -76,7 +74,7 @@ pub fn check(root_path: &Path, bless: bool, bad: &mut bool) {
7674
*/
7775
[
7876
"#;
79-
let tidy_src = root_path.join("src").join("tools").join("tidy").join("src");
77+
let tidy_src = src_path.join("tools").join("tidy").join("src");
8078
let org_file_path = tidy_src.join("expected_run_make_makefiles.txt");
8179
let temp_file_path = tidy_src.join("blessed_expected_run_make_makefiles.txt");
8280
let mut temp_file = t!(File::create_new(&temp_file_path));

0 commit comments

Comments
 (0)