mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-09 14:25:24 +00:00
Delete executables if the test ran successfully.
This isn't a perfect heuristic, but since the amount of run-fail tests is far lower than run-pass tests for now, it should be sufficient to ensure that we don't run into CI limits. This makes it possible to run the test binary manually (e.g., under gdb/lldb) if it failed to attempt to find out why.
This commit is contained in:
parent
66ee33a437
commit
00bce71144
@ -1400,9 +1400,11 @@ impl<'test> TestCx<'test> {
|
||||
}
|
||||
};
|
||||
|
||||
// delete the executable after running it to save space.
|
||||
// it is ok if the deletion failed.
|
||||
let _ = fs::remove_file(self.make_exe_name());
|
||||
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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user