Closed
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
Area: The compiletest test runnerArea: test infrastructure (may span bootstrap/compiletest/more)Category: An issue proposing an enhancement or a PR with one.Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)Relevant to the compiler team, which will review and decide on the PR/issue.
Type
Projects
Status
Done