aboutsummaryrefslogtreecommitdiff
path: root/gas/testsuite/lib/gas-defs.exp
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 /gas/testsuite/lib/gas-defs.exp
parent4abd8e8de725118c4b01cf71556ffcb4367344f8 (diff)
downloadbinutils-99bcaeaf0ff692348194ed6f30162c3a0cfb9655.zip
binutils-99bcaeaf0ff692348194ed6f30162c3a0cfb9655.tar.gz
binutils-99bcaeaf0ff692348194ed6f30162c3a0cfb9655.tar.bz2
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 'gas/testsuite/lib/gas-defs.exp')
-rw-r--r--gas/testsuite/lib/gas-defs.exp46
1 files changed, 23 insertions, 23 deletions
diff --git a/gas/testsuite/lib/gas-defs.exp b/gas/testsuite/lib/gas-defs.exp
index 2d7d38e..fe36135 100644
--- a/gas/testsuite/lib/gas-defs.exp
+++ b/gas/testsuite/lib/gas-defs.exp
@@ -365,7 +365,7 @@ proc run_dump_tests { testcases {extra_options {}} } {
# FLAGS, in addition to the .o file name. Note that they are run
# with LC_ALL=C in the environment to give consistent sorting
# of symbols. If no FLAGS are needed then use:
-# PROG: [nm objdump readelf addr2line]
+# DUMPPROG: [nm objdump readelf addr2line]
# instead.
# Note: for objdump, we automatically replaces the standard section
# names (.text, .data and .bss) by target ones if any (eg. rx-elf
@@ -413,7 +413,7 @@ proc run_dump_tests { testcases {extra_options {}} } {
#
# error: REGEX
# An error with message matching REGEX must be emitted for the test
-# to pass. The PROG, addr2line, nm, objdump, and readelf options
+# to pass. The DUMPPROG, addr2line, nm, objdump, and readelf options
# have no meaning and need not supplied if this is present.
#
# warning: REGEX
@@ -423,11 +423,11 @@ proc run_dump_tests { testcases {extra_options {}} } {
# warning_output: FILE
# FILE contains regexp lines to be matched against the diagnostic
# output of the assembler. This does not preclude the use of
-# PROG, addr2line, nm, objdump, or readelf.
+# DUMPPROG, addr2line, nm, objdump, or readelf.
#
# error_output: FILE
# Means the same as 'warning_output', but also indicates that the assembler
-# is expected to exit unsuccessfully (therefore PROG, addr2line, nm,
+# is expected to exit unsuccessfully (therefore DUMPPROG, addr2line, nm,
# objdump, and readelf have no meaning and should not be supplied).
#
# section-subst: no
@@ -466,7 +466,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(warning_output) {}
@@ -535,18 +535,18 @@ proc run_dump_test { name {extra_options {}} } {
set opts(warning_output) $opts(error_output)
}
- 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) {
- addr2line { set program addr2line }
- objdump { set program objdump }
- nm { set program nm }
- readelf { set program readelf }
+ if {$opts(DUMPPROG) != ""} {
+ switch -- $opts(DUMPPROG) {
+ addr2line { set dumpprogram addr2line }
+ objdump { set dumpprogram objdump }
+ nm { set dumpprogram nm }
+ readelf { set dumpprogram readelf }
default {
- perror "unrecognized program option $opts(PROG) in $file.d"
+ perror "unrecognized DUMPPROG option $opts(DUMPPROG) in $file.d"
unresolved $testname
return }
}
@@ -554,17 +554,17 @@ proc run_dump_test { name {extra_options {}} } {
# Guess which program to run, by seeing which option was specified.
foreach p {objdump nm readelf addr2line} {
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 == "" && $opts(warning) == "" } {
+ if { $dumpprogram == "" && $opts(warning) == "" } {
perror "dump program unspecified in $file.d"
unresolved $testname
return
@@ -670,7 +670,7 @@ proc run_dump_test { name {extra_options {}} } {
&& (($cmdret == 0) == ($opts(warning) != "")) } {
# We have the expected output from gas.
# Return if there's nothing more to do.
- if { $opts(error) != "" || $program == "" } {
+ if { $opts(error) != "" || $dumpprogram == "" } {
pass $testname
return
}
@@ -714,12 +714,12 @@ proc run_dump_test { name {extra_options {}} } {
}
}
- if { $program == "" } {
+ if { $dumpprogram == "" } {
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
@@ -729,7 +729,7 @@ proc run_dump_test { name {extra_options {}} } {
# For objdump, automatically translate standard section names to the targets one,
# if they are different.
set sect_names [get_standard_section_names]
- if { $sect_names != "" && $program == "objdump" && $opts(section-subst) == ""} {
+ if { $sect_names != "" && $dumpprogram == "objdump" && $opts(section-subst) == ""} {
regsub -- "-j \\.text" $progopts1 "-j [lindex $sect_names 0]" progopts1
regsub -- "-j \\.data" $progopts1 "-j [lindex $sect_names 1]" progopts1
regsub -- "-j \\.bss" $progopts1 "-j [lindex $sect_names 2]" progopts1
@@ -751,7 +751,7 @@ proc run_dump_test { name {extra_options {}} } {
}
# Create the substition list only for objdump reference.
- if { $sect_names != "" && $program == "objdump" } {
+ if { $sect_names != "" && $dumpprogram == "objdump" } {
# Some testcases use ".text" while others use "\.text".
set regexp_subst [list "\\\\?\\.text" [lindex $sect_names 0] \
"\\\\?\\.data" [lindex $sect_names 1] \