aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2024-08-29 12:00:17 +0930
committerAlan Modra <amodra@gmail.com>2024-08-29 21:05:57 +0930
commit9459f695d3b79ac5509d8da8b1f4f7d68d91e840 (patch)
tree00804b18c14e075c842850c193a8bd5fff15d5e3
parent35e273526b7d4e345bb77a042af093508dad57f4 (diff)
downloadbinutils-9459f695d3b79ac5509d8da8b1f4f7d68d91e840.zip
binutils-9459f695d3b79ac5509d8da8b1f4f7d68d91e840.tar.gz
binutils-9459f695d3b79ac5509d8da8b1f4f7d68d91e840.tar.bz2
ld testsuite output files
In many cases the output of one run_cc_link_tests test is used as input for another test. I hit a case where some system change caused errors when compiling object files, but the old .so output from a previous test run was still there, and then was used in following tests. * testsuite/lib/ld-lib.exp (run_ld_link_tests): Delete output file before building. (run_ld_link_exec_tests, run_cc_link_tests): Likewise.
-rw-r--r--ld/testsuite/lib/ld-lib.exp15
1 files changed, 15 insertions, 0 deletions
diff --git a/ld/testsuite/lib/ld-lib.exp b/ld/testsuite/lib/ld-lib.exp
index 5d5905d..c540940 100644
--- a/ld/testsuite/lib/ld-lib.exp
+++ b/ld/testsuite/lib/ld-lib.exp
@@ -488,6 +488,11 @@ proc run_ld_link_tests { ldtests args } {
set maybe_failed 0
set ld_output ""
+ # Don't leave previous output around
+ if { $binfile ne "tmpdir/" } {
+ remote_file host delete $binfile
+ }
+
# Add -fno-lto. LTO should be tested explicitly by $cflags.
if {[check_lto_available]} {
set cflags "-fno-lto $cflags"
@@ -706,6 +711,11 @@ proc run_ld_link_exec_tests { ldtests args } {
set objfiles {}
set failed 0
+ # Don't leave previous output around
+ if { $binfile ne "tmpdir/" } {
+ remote_file host delete $binfile
+ }
+
if { ![check_compiler_available] } {
unsupported $testname
continue
@@ -875,6 +885,11 @@ proc run_cc_link_tests { ldtests } {
set check_ld(terminal) 0
set check_ld(source) ""
+ # Don't leave previous output around
+ if { $binfile ne "tmpdir/" } {
+ remote_file host delete $binfile
+ }
+
if { ![check_compiler_available] } {
unsupported $testname
continue