Skip to content

Commit 81e3af7

Browse files
committed
Rename expected_run_make_makefiles -> allowed_run_make_makefiles
1 parent 7cf69a8 commit 81e3af7

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/tools/tidy/src/run_make_tests.rs

+9-9
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ pub fn check(tests_path: &Path, src_path: &Path, bless: bool, bad: &mut bool) {
99
let allowed_makefiles = {
1010
// We use `include!` here which includes the file as Rust syntax because we want to have
1111
// a comment that discourages people from adding entries to
12-
// `expected_run_make_makefiles.txt` unless *absolutely* necessary.
13-
let allowed_makefiles = include!("expected_run_make_makefiles.txt");
12+
// `allowed_run_make_makefiles.txt` unless *absolutely* necessary.
13+
let allowed_makefiles = include!("allowed_run_make_makefiles.txt");
1414
let is_sorted = allowed_makefiles.windows(2).all(|w| w[0] < w[1]);
1515
if !is_sorted && !bless {
1616
tidy_error!(
1717
bad,
18-
"`src/tools/tidy/src/expected_run_make_makefiles.txt` is not in order, likely \
18+
"`src/tools/tidy/src/allowed_run_make_makefiles.txt` is not in order, likely \
1919
because you modified it manually, please only update it with command \
2020
`x test tidy --bless`"
2121
);
@@ -25,7 +25,7 @@ pub fn check(tests_path: &Path, src_path: &Path, bless: bool, bad: &mut bool) {
2525
if allowed_makefiles_unique.len() != allowed_makefiles.len() {
2626
tidy_error!(
2727
bad,
28-
"`src/tools/tidy/src/expected_run_make_makefiles.txt` contains duplicate entries, \
28+
"`src/tools/tidy/src/allowed_run_make_makefiles.txt` contains duplicate entries, \
2929
likely because you modified it manually, please only update it with command \
3030
`x test tidy --bless`"
3131
);
@@ -54,7 +54,7 @@ pub fn check(tests_path: &Path, src_path: &Path, bless: bool, bad: &mut bool) {
5454
tidy_error!(
5555
bad,
5656
"found run-make Makefile not permitted in \
57-
`src/tools/tidy/src/expected_run_make_makefiles.txt`, please write new run-make \
57+
`src/tools/tidy/src/allowed_run_make_makefiles.txt`, please write new run-make \
5858
tests with `rmake.rs` instead: {}",
5959
entry.path().display()
6060
);
@@ -64,7 +64,7 @@ pub fn check(tests_path: &Path, src_path: &Path, bless: bool, bad: &mut bool) {
6464

6565
// If there are any expected Makefiles remaining, they were moved or deleted.
6666
// Our data must remain up to date, so they must be removed from
67-
// `src/tools/tidy/src/expected_run_make_makefiles.txt`.
67+
// `src/tools/tidy/src/allowed_run_make_makefiles.txt`.
6868
// This can be done automatically on --bless, or else a tidy error will be issued.
6969
if bless && !remaining_makefiles.is_empty() {
7070
let header = r#"/*
@@ -75,8 +75,8 @@ pub fn check(tests_path: &Path, src_path: &Path, bless: bool, bad: &mut bool) {
7575
[
7676
"#;
7777
let tidy_src = src_path.join("tools").join("tidy").join("src");
78-
let org_file_path = tidy_src.join("expected_run_make_makefiles.txt");
79-
let temp_file_path = tidy_src.join("blessed_expected_run_make_makefiles.txt");
78+
let org_file_path = tidy_src.join("allowed_run_make_makefiles.txt");
79+
let temp_file_path = tidy_src.join("blessed_allowed_run_make_makefiles.txt");
8080
let mut temp_file = t!(File::create_new(&temp_file_path));
8181
t!(write!(temp_file, "{}", header));
8282
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) {
9191
tidy_error!(
9292
bad,
9393
"Makefile `{}` no longer exists and should be removed from the exclusions in \
94-
`src/tools/tidy/src/expected_run_make_makefiles.txt`",
94+
`src/tools/tidy/src/allowed_run_make_makefiles.txt`",
9595
p.display()
9696
);
9797
}

0 commit comments

Comments
 (0)