Skip to content

Commit b73aa64

Browse files
committed
Auto merge of #146233 - jieyouxu:run-make-fission, r=Kobzol
Split `run-make` into two {`run-make`,`run-make-cargo`} test suites ## Summary Split `tests/run-make` into two test suites, to make it faster and more convenient for contributors to run run-make tests that do not need in-tree `cargo`. | New test suites | Explanation | | ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `tests/run-make` | The "fast path" test suite intended for run-make tests that do not need in-tree `cargo`. These tests may not use `cargo`. | | `tests/run-make-cargo` | The "slow path" test suite that requires checking out `cargo` submodule and building in-tree `cargo`, and thus will have access to in-tree `cargo`. In practice, these constitute a very small portion of the original `run-make` tests. | This PR carries out [MCP 847: Split run-make test suite into slower-building test suite with suitably-staged cargo and faster-building test suite without cargo](rust-lang/compiler-team#847). Fixes rust-lang/rust#135573 (for the tests that do not need in-tree `cargo`). Fixes rust-lang/rust#134109. ## Remarks - I considered if we want to split by in-tree tools previously. However, as discussed rust-lang/rust#134109, in practice `rustdoc` is not very slow to build, but `cargo` takes a good few minutes. So, the partition boundary was determined to be along in-tree `cargo` availability. - The `run-make` tests previously that wanted to use `cargo` cannot just use the bootstrap `cargo`, otherwise they would run into situations where bootstrap `cargo` can significantly diverge from in-tree `cargo` (see rust-lang/rust#130642). --- try-job: aarch64-msvc-1 try-job: test-various try-job: x86_64-gnu-debug try-job: aarch64-gnu-debug try-job: aarch64-apple try-job: dist-various-1
2 parents fb3f594 + f4092b0 commit b73aa64

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

build_system/src/test.rs

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1083,27 +1083,36 @@ where
10831083

10841084
fn test_rustc(env: &Env, args: &TestArg) -> Result<(), String> {
10851085
test_rustc_inner(env, args, |_| Ok(false), false, "run-make")?;
1086+
test_rustc_inner(env, args, |_| Ok(false), false, "run-make-cargo")?;
10861087
test_rustc_inner(env, args, |_| Ok(false), false, "ui")
10871088
}
10881089

10891090
fn test_failing_rustc(env: &Env, args: &TestArg) -> Result<(), String> {
1090-
let result1 = test_rustc_inner(
1091+
let run_make_result = test_rustc_inner(
10911092
env,
10921093
args,
10931094
retain_files_callback("tests/failing-run-make-tests.txt", "run-make"),
10941095
false,
10951096
"run-make",
10961097
);
10971098

1098-
let result2 = test_rustc_inner(
1099+
let run_make_cargo_result = test_rustc_inner(
1100+
env,
1101+
args,
1102+
retain_files_callback("tests/failing-run-make-tests.txt", "run-make-cargo"),
1103+
false,
1104+
"run-make",
1105+
);
1106+
1107+
let ui_result = test_rustc_inner(
10991108
env,
11001109
args,
11011110
retain_files_callback("tests/failing-ui-tests.txt", "ui"),
11021111
false,
11031112
"ui",
11041113
);
11051114

1106-
result1.and(result2)
1115+
run_make_result.and(run_make_cargo_result).and(ui_result)
11071116
}
11081117

11091118
fn test_successful_rustc(env: &Env, args: &TestArg) -> Result<(), String> {
@@ -1120,6 +1129,13 @@ fn test_successful_rustc(env: &Env, args: &TestArg) -> Result<(), String> {
11201129
remove_files_callback("tests/failing-run-make-tests.txt", "run-make"),
11211130
false,
11221131
"run-make",
1132+
)?;
1133+
test_rustc_inner(
1134+
env,
1135+
args,
1136+
remove_files_callback("tests/failing-run-make-tests.txt", "run-make-cargo"),
1137+
false,
1138+
"run-make-cargo",
11231139
)
11241140
}
11251141

0 commit comments

Comments
 (0)