diff options
| author | 许杰友 Jieyou Xu (Joe) <jieyouxu@outlook.com> | 2024-03-22 19:13:11 +0000 |
|---|---|---|
| committer | 许杰友 Jieyou Xu (Joe) <jieyouxu@outlook.com> | 2024-03-27 20:00:34 +0000 |
| commit | 81e3af7f4df5d42feb94c28d7f62eb53e6b6d5c6 (patch) | |
| tree | 318e58877dee7aa03f3a505149ea981b20f3343d | |
| parent | 7cf69a82304e1d01ea54b029a9e76af7f00e459b (diff) | |
| download | rust-81e3af7f4df5d42feb94c28d7f62eb53e6b6d5c6.tar.gz rust-81e3af7f4df5d42feb94c28d7f62eb53e6b6d5c6.zip | |
Rename expected_run_make_makefiles -> allowed_run_make_makefiles
| -rw-r--r-- | src/tools/tidy/src/allowed_run_make_makefiles.txt (renamed from src/tools/tidy/src/expected_run_make_makefiles.txt) | 0 | ||||
| -rw-r--r-- | src/tools/tidy/src/run_make_tests.rs | 18 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/tools/tidy/src/expected_run_make_makefiles.txt b/src/tools/tidy/src/allowed_run_make_makefiles.txt index 0e8a4503aa5..0e8a4503aa5 100644 --- a/src/tools/tidy/src/expected_run_make_makefiles.txt +++ b/src/tools/tidy/src/allowed_run_make_makefiles.txt diff --git a/src/tools/tidy/src/run_make_tests.rs b/src/tools/tidy/src/run_make_tests.rs index 2d34bfc28f4..47bafb4b39e 100644 --- a/src/tools/tidy/src/run_make_tests.rs +++ b/src/tools/tidy/src/run_make_tests.rs @@ -9,13 +9,13 @@ 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 - // `expected_run_make_makefiles.txt` unless *absolutely* necessary. - let allowed_makefiles = include!("expected_run_make_makefiles.txt"); + // `allowed_run_make_makefiles.txt` unless *absolutely* necessary. + let allowed_makefiles = include!("allowed_run_make_makefiles.txt"); let is_sorted = allowed_makefiles.windows(2).all(|w| w[0] < w[1]); if !is_sorted && !bless { tidy_error!( bad, - "`src/tools/tidy/src/expected_run_make_makefiles.txt` is not in order, likely \ + "`src/tools/tidy/src/allowed_run_make_makefiles.txt` is not in order, likely \ because you modified it manually, please only update it with command \ `x test tidy --bless`" ); @@ -25,7 +25,7 @@ pub fn check(tests_path: &Path, src_path: &Path, bless: bool, bad: &mut bool) { if allowed_makefiles_unique.len() != allowed_makefiles.len() { tidy_error!( bad, - "`src/tools/tidy/src/expected_run_make_makefiles.txt` contains duplicate entries, \ + "`src/tools/tidy/src/allowed_run_make_makefiles.txt` contains duplicate entries, \ likely because you modified it manually, please only update it with command \ `x test tidy --bless`" ); @@ -54,7 +54,7 @@ pub fn check(tests_path: &Path, src_path: &Path, bless: bool, bad: &mut bool) { tidy_error!( bad, "found run-make Makefile not permitted in \ - `src/tools/tidy/src/expected_run_make_makefiles.txt`, please write new run-make \ + `src/tools/tidy/src/allowed_run_make_makefiles.txt`, please write new run-make \ tests with `rmake.rs` instead: {}", entry.path().display() ); @@ -64,7 +64,7 @@ pub fn check(tests_path: &Path, src_path: &Path, bless: bool, bad: &mut bool) { // If there are any expected Makefiles remaining, they were moved or deleted. // Our data must remain up to date, so they must be removed from - // `src/tools/tidy/src/expected_run_make_makefiles.txt`. + // `src/tools/tidy/src/allowed_run_make_makefiles.txt`. // This can be done automatically on --bless, or else a tidy error will be issued. if bless && !remaining_makefiles.is_empty() { let header = r#"/* @@ -75,8 +75,8 @@ pub fn check(tests_path: &Path, src_path: &Path, bless: bool, bad: &mut bool) { [ "#; 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 org_file_path = tidy_src.join("allowed_run_make_makefiles.txt"); + let temp_file_path = tidy_src.join("blessed_allowed_run_make_makefiles.txt"); let mut temp_file = t!(File::create_new(&temp_file_path)); t!(write!(temp_file, "{}", header)); for file in allowed_makefiles.difference(&remaining_makefiles) { @@ -91,7 +91,7 @@ pub fn check(tests_path: &Path, src_path: &Path, bless: bool, bad: &mut bool) { tidy_error!( bad, "Makefile `{}` no longer exists and should be removed from the exclusions in \ - `src/tools/tidy/src/expected_run_make_makefiles.txt`", + `src/tools/tidy/src/allowed_run_make_makefiles.txt`", p.display() ); } |
