mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-20 18:08:24 +08:00
binutils/testsuite: Permit the reuse of dump patterns
Complement commit 89210bdc8fd2 ("GAS: Permit the reuse of dump patterns"), <https://sourceware.org/ml/binutils/2010-07/msg00269.html>, and commit ef2b5578f693 ("MIPS: Enable NewABI tests for SDE targets"), <https://sourceware.org/ml/binutils/2012-08/msg00017.html>, and like the GAS and LD versions make the binutils version of `run_dump_test' also support the `dump' keyword, for reusing dump patterns between tests. binutils/ * testsuite/lib/utils-lib.exp (run_dump_test): Handle the `dump' option.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2017-05-19 Maciej W. Rozycki <macro@imgtec.com>
|
||||||
|
|
||||||
|
* testsuite/lib/utils-lib.exp (run_dump_test): Handle the `dump'
|
||||||
|
option.
|
||||||
|
|
||||||
2017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
|
2017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
|
||||||
|
|
||||||
* NEWS: Mention the SPARC M8 support.
|
* NEWS: Mention the SPARC M8 support.
|
||||||
|
@ -214,6 +214,11 @@ proc exe_ext {} {
|
|||||||
# Assemble the file SOURCE.s. If omitted, this defaults to FILE.s.
|
# Assemble the file SOURCE.s. If omitted, this defaults to FILE.s.
|
||||||
# This is useful if several .d files want to share a .s file.
|
# This is useful if several .d files want to share a .s file.
|
||||||
#
|
#
|
||||||
|
# dump: DUMP
|
||||||
|
# Match against DUMP.d. If omitted, this defaults to FILE.d. This
|
||||||
|
# is useful if several .d files differ by options only. Options are
|
||||||
|
# always read from FILE.d.
|
||||||
|
#
|
||||||
# target: GLOBS...
|
# target: GLOBS...
|
||||||
# Run this test only on a specified list of targets. More precisely,
|
# Run this test only on a specified list of targets. More precisely,
|
||||||
# each glob in the space-separated list is passed to "istarget"; if
|
# each glob in the space-separated list is passed to "istarget"; if
|
||||||
@ -299,6 +304,7 @@ proc run_dump_test { name {extra_options {}} } {
|
|||||||
set opts(PROG) {}
|
set opts(PROG) {}
|
||||||
set opts(DUMPPROG) {}
|
set opts(DUMPPROG) {}
|
||||||
set opts(source) {}
|
set opts(source) {}
|
||||||
|
set opts(dump) {}
|
||||||
set opts(target) {}
|
set opts(target) {}
|
||||||
set opts(not-target) {}
|
set opts(not-target) {}
|
||||||
set opts(skip) {}
|
set opts(skip) {}
|
||||||
@ -456,6 +462,12 @@ proc run_dump_test { name {extra_options {}} } {
|
|||||||
set srcfile $srcdir/$subdir/$opts(source)
|
set srcfile $srcdir/$subdir/$opts(source)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if { $opts(dump) == "" } {
|
||||||
|
set dumpfile ${file}.d
|
||||||
|
} else {
|
||||||
|
set dumpfile $srcdir/$subdir/$opts(dump)
|
||||||
|
}
|
||||||
|
|
||||||
if { $opts(as) == "binary" } {
|
if { $opts(as) == "binary" } {
|
||||||
while {[file type $srcfile] eq "link"} {
|
while {[file type $srcfile] eq "link"} {
|
||||||
set newfile [file readlink $srcfile]
|
set newfile [file readlink $srcfile]
|
||||||
@ -535,7 +547,7 @@ proc run_dump_test { name {extra_options {}} } {
|
|||||||
}
|
}
|
||||||
|
|
||||||
verbose_eval {[file_contents "tmpdir/dump.out"]} 3
|
verbose_eval {[file_contents "tmpdir/dump.out"]} 3
|
||||||
if { [regexp_diff "tmpdir/dump.out" "${file}.d"] } then {
|
if { [regexp_diff "tmpdir/dump.out" "${dumpfile}"] } then {
|
||||||
fail $testname
|
fail $testname
|
||||||
verbose "output is [file_contents "tmpdir/dump.out"]" 2
|
verbose "output is [file_contents "tmpdir/dump.out"]" 2
|
||||||
return
|
return
|
||||||
|
Reference in New Issue
Block a user