We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents b8398d9 + 00bce71 commit b54f27bCopy full SHA for b54f27b
src/tools/compiletest/src/runtest.rs
@@ -1343,7 +1343,7 @@ impl<'test> TestCx<'test> {
1343
fn exec_compiled_test(&self) -> ProcRes {
1344
let env = &self.props.exec_env;
1345
1346
- match &*self.config.target {
+ let proc_res = match &*self.config.target {
1347
// This is pretty similar to below, we're transforming:
1348
//
1349
// program arg1 arg2
@@ -1398,7 +1398,15 @@ impl<'test> TestCx<'test> {
1398
None,
1399
)
1400
}
1401
+ };
1402
+
1403
+ if proc_res.status.success() {
1404
+ // delete the executable after running it to save space.
1405
+ // it is ok if the deletion failed.
1406
+ let _ = fs::remove_file(self.make_exe_name());
1407
1408
1409
+ proc_res
1410
1411
1412
/// For each `aux-build: foo/bar` annotation, we check to find the
0 commit comments