Skip to content

Commit 4ac02cb

Browse files
committed
Remove the temporary directory when a check ends
1 parent 4c6caaa commit 4ac02cb

File tree

1 file changed

+6
-0
lines changed
  • src/bootstrap/src/core/build_steps

1 file changed

+6
-0
lines changed

src/bootstrap/src/core/build_steps/test.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3262,6 +3262,8 @@ fn distcheck_plain_source_tarball(builder: &Builder<'_>, plain_src_dir: &Path) {
32623262
.env("GITHUB_ACTIONS", "0")
32633263
.current_dir(plain_src_dir)
32643264
.run(builder);
3265+
// Mitigate pressure on small-capacity disks.
3266+
fs::remove_dir_all(plain_src_dir).unwrap();
32653267
}
32663268

32673269
/// Check that rust-src has all of libstd's dependencies
@@ -3287,6 +3289,8 @@ fn distcheck_rust_src(builder: &Builder<'_>, src_dir: &Path) {
32873289
.arg(&toml)
32883290
.current_dir(src_dir)
32893291
.run(builder);
3292+
// Mitigate pressure on small-capacity disks.
3293+
fs::remove_dir_all(src_dir).unwrap();
32903294
}
32913295

32923296
/// Check that rustc-dev's compiler crate source code can be loaded with `cargo metadata`
@@ -3311,6 +3315,8 @@ fn distcheck_rustc_dev(builder: &Builder<'_>, dir: &Path) {
33113315
.env("RUSTC", &builder.initial_rustc)
33123316
.current_dir(dir)
33133317
.run(builder);
3318+
// Mitigate pressure on small-capacity disks.
3319+
fs::remove_dir_all(dir).unwrap();
33143320
}
33153321

33163322
#[derive(Debug, Clone, PartialEq, Eq, Hash)]

0 commit comments

Comments
 (0)