Skip to content

Commit

Permalink
Auto merge of #48144 - kennytm:reduce-musl-test-size, r=Mark-Simulacrum
Browse files Browse the repository at this point in the history
Compiletest: delete the compiled program once its test is done.

Reduces CI disk usage which prevents #48118 from succeeding.
  • Loading branch information
bors committed Feb 12, 2018
2 parents b8398d9 + 00bce71 commit b54f27b
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/tools/compiletest/src/runtest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1343,7 +1343,7 @@ impl<'test> TestCx<'test> {
fn exec_compiled_test(&self) -> ProcRes {
let env = &self.props.exec_env;

match &*self.config.target {
let proc_res = match &*self.config.target {
// This is pretty similar to below, we're transforming:
//
// program arg1 arg2
Expand Down Expand Up @@ -1398,7 +1398,15 @@ impl<'test> TestCx<'test> {
None,
)
}
};

if proc_res.status.success() {
// delete the executable after running it to save space.
// it is ok if the deletion failed.
let _ = fs::remove_file(self.make_exe_name());
}

proc_res
}

/// For each `aux-build: foo/bar` annotation, we check to find the
Expand Down

0 comments on commit b54f27b

Please sign in to comment.