aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2017-07-13 08:10:57 -0700
committerH.J. Lu <hjl.tools@gmail.com>2017-07-13 08:10:57 -0700
commita502b0bbb8f3fb7dca4f2a12aa04afa28173f0c2 (patch)
tree05410717cc68b11e531ddee6ddd1fda4916bb1d1 /binutils
parentbbe7ef6699236cf94d0f4e597bdce99158905edc (diff)
downloadgdb-a502b0bbb8f3fb7dca4f2a12aa04afa28173f0c2.zip
gdb-a502b0bbb8f3fb7dca4f2a12aa04afa28173f0c2.tar.gz
gdb-a502b0bbb8f3fb7dca4f2a12aa04afa28173f0c2.tar.bz2
Always delete $testarchive first
Always delete $testarchive first so that it exists only when it is supported, * testsuite/binutils-all/objdump.exp: Always delete $testarchive first.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog5
-rw-r--r--binutils/testsuite/binutils-all/objdump.exp12
2 files changed, 10 insertions, 7 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 4f7521a..19de4a0 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,8 @@
+2017-07-13 H.J. Lu <hongjiu.lu@intel.com>
+
+ * testsuite/binutils-all/objdump.exp: Always delete $testarchive
+ first.
+
2017-07-12 Alan Modra <amodra@gmail.com>
* po/bg.po: Update from translationproject.org/latest/binutils/.
diff --git a/binutils/testsuite/binutils-all/objdump.exp b/binutils/testsuite/binutils-all/objdump.exp
index 3dee405..472b749 100644
--- a/binutils/testsuite/binutils-all/objdump.exp
+++ b/binutils/testsuite/binutils-all/objdump.exp
@@ -75,18 +75,16 @@ if [is_remote host] {
set testfile2 tmpdir/bintest2.o
}
+# $testarchive exists only if it is supported.
+set testarchive tmpdir/bintest.a
+remote_file host file delete $testarchive
if { ![istarget "alpha-*-*"] || [is_elf_format] } then {
- remote_file host file delete tmpdir/bintest.a
set got [binutils_run $AR "rc tmpdir/bintest.a $testfile2"]
if ![string match "" $got] then {
fail "bintest.a"
remote_file host delete tmpdir/bintest.a
- } else {
- if [is_remote host] {
- set testarchive [remote_download host tmpdir/bintest.a]
- } else {
- set testarchive tmpdir/bintest.a
- }
+ } elseif [is_remote host] {
+ set testarchive [remote_download host tmpdir/bintest.a]
}
remote_file host delete tmpdir/bintest2.o
}