mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-28 02:57:37 +00:00
compiletest: Delete the executable immediately after running.
This should save a lot of space on musl test cases (whose standard library are linked statically).
This commit is contained in:
parent
0bb8935136
commit
66ee33a437
@ -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
|
||||
@ -1398,7 +1398,13 @@ impl<'test> TestCx<'test> {
|
||||
None,
|
||||
)
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// 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
|
||||
|
Loading…
Reference in New Issue
Block a user