-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-compiletestArea: The compiletest test runnerArea: The compiletest test runnerA-test-infraArea: test infrastructure (may span bootstrap/compiletest/more)Area: test infrastructure (may span bootstrap/compiletest/more)C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.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)T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
cf. #134351. The current impl of remove_and_create_dir_all
silently ignores the remove_dir_all
failure and tries to create_dir_all
, which can fail if remove_dir_all
fails and a directory already exists.
fn remove_and_create_dir_all(path: &Path) {
let _ = fs::remove_dir_all(path);
fs::create_dir_all(path).unwrap();
}
compiletest
cannot paper over create_dir_all
failures (esp. if due to the directory already existing) to avoid running tests against outdated/invalid artifacts. So maybe a retry mechanism is needed. However, this should not be spot-fixed, and instead the retry mechanism should be shared between bootstrap/compiletest, preferrably in build_helpers
with its own tests.
Metadata
Metadata
Assignees
Labels
A-compiletestArea: The compiletest test runnerArea: The compiletest test runnerA-test-infraArea: test infrastructure (may span bootstrap/compiletest/more)Area: test infrastructure (may span bootstrap/compiletest/more)C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.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)T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.