]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
testsuite: outputs.exp: cleanup before running tests
authorAlexandre Oliva <oliva@adacore.com>
Wed, 22 Jun 2022 02:10:59 +0000 (23:10 -0300)
committerAlexandre Oliva <oliva@gnu.org>
Wed, 22 Jun 2022 02:10:59 +0000 (23:10 -0300)
Use the just-added dry-run infrastructure to clean up files that may
have been left over by interrupted runs of outputs.exp, which used to
lead to spurious non-repeatable (self-fixing) failures.

for  gcc/testsuite/ChangeLog

* gcc.misc-tests/outputs.exp: Clean up left-overs first.

gcc/testsuite/gcc.misc-tests/outputs.exp

index a63ce66693b976c35eee699c5c51fda79558080c..ab919db1ccb2d103fa340f839ef9401da230afd9 100644 (file)
@@ -304,6 +304,9 @@ if { "$aout" != "" } then {
     set oaout "-o $aout"
 }
 
+# Clean up any left-overs from an earlier interrupted run.
+outest "$b-cleanup?" $sing "$oaout" {alt/ dir/ o/ od/ obj/} {{} {} {} {} {} {$aout}}
+
 # Sometimes the -I or -L flags that cause the compiler driver to save
 # .args.[01], instead of leaving it for the linker to save .ld1_args,
 # is hiding in driver self specs.