-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-testsuiteArea: The testsuite used to check the correctness of rustcArea: The testsuite used to check the correctness of rustcC-cleanupCategory: PRs that clean code up or issues documenting cleanup.Category: PRs that clean code up or issues documenting cleanup.E-help-wantedCall for participation: Help is requested to fix this issue.Call for participation: Help is requested to fix this issue.E-mediumCall for participation: Medium difficulty. Experience needed to fix: Intermediate.Call for participation: Medium difficulty. Experience needed to fix: Intermediate.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Description
Right now, we copy paste a bunch of code in various places and it ends up with not all test suites supporting the same arguments. See for example #66458. We should refactor all these Steps to use the same logic for the flags to pass to cargo.
Lines 2448 to 2464 in 131ef95
if !builder.fail_fast { | |
cmd.arg("--no-fail-fast"); | |
} | |
match builder.doc_tests { | |
DocTests::Only => { | |
cmd.arg("--doc"); | |
} | |
DocTests::No => { | |
cmd.args(&["--lib", "--bins", "--examples", "--tests", "--benches"]); | |
} | |
DocTests::Yes => {} | |
} | |
cmd.arg("--").args(&builder.config.cmd.test_args()); | |
// rustbuild tests are racy on directory creation so just run them one at a time. | |
// Since there's not many this shouldn't be a problem. | |
cmd.arg("--test-threads=1"); |
fn test_args(cargo: &mut Cargo) {}
that we call instead of trying to keep these in sync.
Originally posted by @jyn514 in #72536 (comment)
Metadata
Metadata
Assignees
Labels
A-testsuiteArea: The testsuite used to check the correctness of rustcArea: The testsuite used to check the correctness of rustcC-cleanupCategory: PRs that clean code up or issues documenting cleanup.Category: PRs that clean code up or issues documenting cleanup.E-help-wantedCall for participation: Help is requested to fix this issue.Call for participation: Help is requested to fix this issue.E-mediumCall for participation: Medium difficulty. Experience needed to fix: Intermediate.Call for participation: Medium difficulty. Experience needed to fix: Intermediate.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)