Skip to content

Commit 5bef436

Browse files
dianqkcuviper
authored andcommitted
Remove the temporary directory when a check ends
(cherry picked from commit a3482d9)
1 parent 3f2437c commit 5bef436

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
@@ -3263,6 +3263,8 @@ fn distcheck_plain_source_tarball(builder: &Builder<'_>, plain_src_dir: &Path) {
32633263
.env("GITHUB_ACTIONS", "0")
32643264
.current_dir(plain_src_dir)
32653265
.run(builder);
3266+
// Mitigate pressure on small-capacity disks.
3267+
builder.remove_dir(plain_src_dir);
32663268
}
32673269

32683270
/// Check that rust-src has all of libstd's dependencies
@@ -3288,6 +3290,8 @@ fn distcheck_rust_src(builder: &Builder<'_>, src_dir: &Path) {
32883290
.arg(&toml)
32893291
.current_dir(src_dir)
32903292
.run(builder);
3293+
// Mitigate pressure on small-capacity disks.
3294+
builder.remove_dir(src_dir);
32913295
}
32923296

32933297
/// Check that rustc-dev's compiler crate source code can be loaded with `cargo metadata`
@@ -3312,6 +3316,8 @@ fn distcheck_rustc_dev(builder: &Builder<'_>, dir: &Path) {
33123316
.env("RUSTC", &builder.initial_rustc)
33133317
.current_dir(dir)
33143318
.run(builder);
3319+
// Mitigate pressure on small-capacity disks.
3320+
builder.remove_dir(dir);
33153321
}
33163322

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

0 commit comments

Comments
 (0)