If we have an existing archive, the test may fail due to it being the
wrong format. Also, downloading bintest.thin.a from a remote host
(before creating it!) is wrong.
* testsuite/binutils-all/readelf.exp (readelf_thin_archive_test):
Don't remote_download bintest.thin.a. Delete lib before
creating.
if ![is_remote host] {
set tempfile tmpdir/bintest.o
- set templib tmpdir/bintest.thin.a
set libname tmpdir/bintest.thin.a
} else {
set tempfile [remote_download host tmpdir/bintest.o]
- set templib [remote_download host tmpdir/bintest.thin.a]
set libname bintest.thin.a
}
set testname "readelf -h bintest.thin"
+ file_on_host delete $libname
set got [binutils_run $AR "rcT $libname ${tempfile}"]
if ![string match "" $got] {
fail $testname
return
}
- readelf_test -h $templib readelf.h.thin
+ readelf_test -h $libname readelf.h.thin
pass $testname
}