diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2015-09-30 10:50:36 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2015-09-30 10:50:36 -0700 |
commit | 4ee959fb247a677b048ce3c59c1399c023a400d9 (patch) | |
tree | 7859f8b5c62bd7f72535a01ae112b07cb16a7434 /binutils | |
parent | b8836e409ea9619d9886bfa920b93392decf5be0 (diff) | |
download | fsf-binutils-gdb-4ee959fb247a677b048ce3c59c1399c023a400d9.zip fsf-binutils-gdb-4ee959fb247a677b048ce3c59c1399c023a400d9.tar.gz fsf-binutils-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')
-rw-r--r-- | binutils/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | binutils/testsuite/lib/utils-lib.exp | 7 |
2 files changed, 12 insertions, 0 deletions
diff --git a/binutils/testsuite/ChangeLog b/binutils/testsuite/ChangeLog index f444dc7..3f9b3e5 100644 --- a/binutils/testsuite/ChangeLog +++ b/binutils/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2015-09-30 H.J. Lu <hongjiu.lu@intel.com> + + * lib/utils-lib.exp (run_dump_test): Handle symbolic link when + copying source file. + 2015-09-29 H.J. Lu <hongjiu.lu@intel.com> PR binutils/19020 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)] |