aboutsummaryrefslogtreecommitdiff
path: root/binutils/testsuite/lib
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2015-09-30 10:50:36 -0700
committerH.J. Lu <hjl.tools@gmail.com>2015-09-30 10:50:36 -0700
commit4ee959fb247a677b048ce3c59c1399c023a400d9 (patch)
tree7859f8b5c62bd7f72535a01ae112b07cb16a7434 /binutils/testsuite/lib
parentb8836e409ea9619d9886bfa920b93392decf5be0 (diff)
downloadgdb-4ee959fb247a677b048ce3c59c1399c023a400d9.zip
gdb-4ee959fb247a677b048ce3c59c1399c023a400d9.tar.gz
gdb-4ee959fb247a677b048ce3c59c1399c023a400d9.tar.bz2
Handle symbolic link when copying source file
* lib/utils-lib.exp (run_dump_test): Handle symbolic link when copying source file.
Diffstat (limited to 'binutils/testsuite/lib')
-rw-r--r--binutils/testsuite/lib/utils-lib.exp7
1 files changed, 7 insertions, 0 deletions
diff --git a/binutils/testsuite/lib/utils-lib.exp b/binutils/testsuite/lib/utils-lib.exp
index fd5b6f6..d088201 100644
--- a/binutils/testsuite/lib/utils-lib.exp
+++ b/binutils/testsuite/lib/utils-lib.exp
@@ -448,6 +448,13 @@ proc run_dump_test { name {extra_options {}} } {
}
if { $opts(as) == "binary" } {
+ while {[file type $srcfile] eq "link"} {
+ set newfile [file readlink $srcfile]
+ if {[string index $newfile 0] ne "/"} {
+ set newfile [file dirname $srcfile]/$newfile
+ }
+ set srcfile $newfile
+ }
file copy -force ${srcfile} $tempfile
} else {
set exec_output [binutils_assemble_flags ${srcfile} $tempfile $opts(as)]