aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2018-09-13 18:55:30 +0930
committerAlan Modra <amodra@gmail.com>2018-09-15 16:24:18 +0930
commit99bcaeaf0ff692348194ed6f30162c3a0cfb9655 (patch)
tree6d13028c41138b2dce113dae342c61e6a4a6de93 /ld/testsuite/lib/ld-lib.exp
parentgas testuite fixes: don't match dump.o (diff)
downloadbinutils-gdb-99bcaeaf0ff692348194ed6f30162c3a0cfb9655.tar.gz
binutils-gdb-99bcaeaf0ff692348194ed6f30162c3a0cfb9655.tar.bz2
binutils-gdb-99bcaeaf0ff692348194ed6f30162c3a0cfb9655.zip
run_dump_test replace PROG with DUMPPROG in gas and ld
To be compatible with the binutils version, that uses PROG for the tool under test and DUMPPROG for the dump tool. gas/ * testsuite/gas/mips/aent-2.d, * testsuite/gas/mips/aent-mdebug-2.d, * testsuite/gas/mips/attr-gnu-4-0.d, * testsuite/gas/mips/attr-gnu-4-1.d, * testsuite/gas/mips/attr-gnu-4-2.d, * testsuite/gas/mips/attr-gnu-4-3.d, * testsuite/gas/mips/attr-gnu-4-5.d, * testsuite/gas/mips/attr-gnu-4-6.d, * testsuite/gas/mips/attr-gnu-4-7.d, * testsuite/gas/mips/attr-none-double.d, * testsuite/gas/mips/attr-none-o32-fp64-nooddspreg.d, * testsuite/gas/mips/attr-none-o32-fp64.d, * testsuite/gas/mips/attr-none-o32-fpxx.d, * testsuite/gas/mips/attr-none-single-float.d, * testsuite/gas/mips/attr-none-soft-float.d, * testsuite/gas/mips/elf-rel27.d, * testsuite/gas/mips/loc-swap-2.d, * testsuite/gas/mips/loc-swap-3.d, * testsuite/gas/mips/loc-swap.d, * testsuite/gas/mips/micromips@loc-swap-2.d, * testsuite/gas/mips/micromips@loc-swap.d, * testsuite/gas/mips/micromips@stabs-symbol-type.d, * testsuite/gas/mips/mips16-intermix.d, * testsuite/gas/mips/mips16@loc-swap-2.d, * testsuite/gas/mips/mips16@loc-swap.d, * testsuite/gas/mips/mips16@stabs-symbol-type.d, * testsuite/gas/mips/mips16e@loc-swap.d, * testsuite/gas/mips/no-odd-spreg.d, * testsuite/gas/mips/odd-spreg.d, * testsuite/gas/mips/r6-attr-none-double.d, * testsuite/gas/mips/stabs-symbol-type.d, * testsuite/lib/gas-defs.exp (run_dump_test): Replace PROG with DUMPPROG. ld/ * testsuite/lib/ld-lib.exp (run_dump_test): Replace PROG with DUMPPROG.
Diffstat (limited to 'ld/testsuite/lib/ld-lib.exp')
-rw-r--r--ld/testsuite/lib/ld-lib.exp43
1 files changed, 22 insertions, 21 deletions
diff --git a/ld/testsuite/lib/ld-lib.exp b/ld/testsuite/lib/ld-lib.exp
index c1ce8ee2f05..edf6e93de54 100644
--- a/ld/testsuite/lib/ld-lib.exp
+++ b/ld/testsuite/lib/ld-lib.exp
@@ -502,7 +502,7 @@ proc ld_link_defsyms {} {
# result is analyzed by an analyzer program specified below (which
# may in turn *also* be objcopy).
#
-# PROG: PROGRAM-NAME
+# DUMPPROG: PROGRAM-NAME
# The name of the program to run to analyze the .o file produced
# by the assembler or the linker output. This can be omitted;
# run_dump_test will guess which program to run by seeing which of
@@ -567,7 +567,7 @@ proc ld_link_defsyms {} {
#
# error: REGEX
# An error with message matching REGEX must be emitted for the test
-# to pass. The PROG, readelf, objdump, and nm options have
+# to pass. The DUMPPROG, readelf, objdump, and nm options have
# no meaning and need not be supplied if this is present. Multiple
# "error" directives append to the expected linker error message.
#
@@ -648,7 +648,7 @@ proc run_dump_test { name {extra_options {}} } {
set opts(nm) {}
set opts(readelf) {}
set opts(name) {}
- set opts(PROG) {}
+ set opts(DUMPPROG) {}
set opts(source) {}
set opts(dump) {}
set opts(error) {}
@@ -815,35 +815,36 @@ proc run_dump_test { name {extra_options {}} } {
}
}
- set program ""
+ set dumpprogram ""
# It's meaningless to require an output-testing method when we
# expect an error.
if { $opts(error) == "" && $opts(error_output) == "" } {
- if {$opts(PROG) != ""} {
- switch -- $opts(PROG) {
- objdump { set program objdump }
- nm { set program nm }
- readelf { set program readelf }
- default
- { perror "unrecognized program option $opts(PROG) in $file.d"
- unresolved $testname
- return }
+ if { $opts(DUMPPROG) != "" } {
+ switch -- $opts(DUMPPROG) {
+ objdump { set dumpprogram objdump }
+ nm { set dumpprogram nm }
+ readelf { set dumpprogram readelf }
+ default {
+ perror "unrecognized DUMPPROG option $opts(DUMPPROG) in $file.d"
+ unresolved $testname
+ return
+ }
}
} else {
# Guess which program to run, by seeing which option was specified.
foreach p {objdump nm readelf} {
if {$opts($p) != ""} {
- if {$program != ""} {
+ if {$dumpprogram != ""} {
perror "ambiguous dump program in $file.d"
unresolved $testname
return
} else {
- set program $p
+ set dumpprogram $p
}
}
}
}
- if { $program == "" \
+ if { $dumpprogram == "" \
&& $opts(map) == "" \
&& $opts(warning) == "" \
&& $opts(warning_output) == "" \
@@ -1056,7 +1057,7 @@ proc run_dump_test { name {extra_options {}} } {
|| (($check_ld(source) == "file") \
&& (![regexp_diff "tmpdir/ld.messages" "$srcdir/$subdir/$check_ld(file)"]))) } {
# We have the expected output from ld.
- if { $check_ld(terminal) || $program == "" } {
+ if { $check_ld(terminal) || $dumpprogram == "" } {
pass $testname
return
}
@@ -1076,7 +1077,7 @@ proc run_dump_test { name {extra_options {}} } {
pass "$testname (map file check)"
}
- if { $program == "" } then {
+ if { $dumpprogram == "" } then {
return
}
}
@@ -1090,9 +1091,9 @@ proc run_dump_test { name {extra_options {}} } {
return
}
- set progopts1 $opts($program)
- eval set progopts \$[string toupper $program]FLAGS
- eval set binary \$[string toupper $program]
+ set progopts1 $opts($dumpprogram)
+ eval set progopts \$[string toupper $dumpprogram]FLAGS
+ eval set binary \$[string toupper $dumpprogram]
if { ![is_remote host] && [which $binary] == 0 } {
untested $testname