gas run_dump_test rename not-target and not-skip
[binutils-gdb.git] / gas / testsuite / lib / gas-defs.exp
index 22984c70e1f70f2f323d931c3926ccbd2be9efd2..e040e947a97811a0e7fb6be8332ae77e7c37b7a4 100644 (file)
@@ -359,14 +359,13 @@ proc run_dump_tests { testcases {extra_options {}} } {
 #
 #   addr2line: FLAGS
 #   nm: FLAGS
-#   objcopy: FLAGS
 #   objdump: FLAGS
 #   readelf: FLAGS
 #      Use the specified program to analyze the .o file, and pass it
 #      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 objcopy objdump readelf addr2line]
+#        PROG: [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
@@ -392,7 +391,7 @@ proc run_dump_tests { testcases {extra_options {}} } {
 #      of them, the test will be run, otherwise it will be marked
 #      unsupported.
 #
-#   not-target: GLOB|PROC ...
+#   notarget: GLOB|PROC ...
 #      Do not run this test on a specified list of targets.  Again, each
 #      glob in the space-separated list is passed to "istarget" and each
 #      proc is called as a TCL procedure, and the test is run if it
@@ -400,8 +399,8 @@ proc run_dump_tests { testcases {extra_options {}} } {
 #      unsupported.
 #
 #   skip: GLOB|PROC ...
-#   not-skip: GLOB|PROC ...
-#       These are exactly the same as "not-target" and "target",
+#   noskip: GLOB|PROC ...
+#       These are exactly the same as "notarget" and "target",
 #       respectively, except that they do nothing at all if the check
 #       fails.  They should only be used in groups, to construct a single
 #       test which is run on all targets but with variant options or
@@ -414,8 +413,8 @@ 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, objdump, nm and objcopy options have no
-#      meaning and need not supplied if this is present.
+#      to pass.  The PROG, addr2line, nm, objdump, and readelf options
+#      have no meaning and need not supplied if this is present.
 #
 #   warning: REGEX
 #      Expect a gas warning matching REGEX.  It is an error to issue
@@ -424,12 +423,12 @@ proc run_dump_tests { testcases {extra_options {}} } {
 #   stderr: FILE
 #       FILE contains regexp lines to be matched against the diagnostic
 #       output of the assembler.  This does not preclude the use of
-#       PROG, nm, objdump, or objcopy.
+#       PROG, addr2line, nm, objdump, or readelf.
 #
 #   error-output: FILE
 #       Means the same as 'stderr', but also indicates that the assembler
-#       is expected to exit unsuccessfully (therefore PROG, objdump, nm,
-#       and objcopy have no meaning and should not be supplied).
+#       is expected to exit unsuccessfully (therefore PROG, addr2line, nm,
+#      objdump, and readelf have no meaning and should not be supplied).
 #
 #   section-subst: no
 #       Means that the section substitution for objdump is disabled.
@@ -465,7 +464,6 @@ proc run_dump_test { name {extra_options {}} } {
     set opts(as) {}
     set opts(objdump) {}
     set opts(nm) {}
-    set opts(objcopy) {}
     set opts(readelf) {}
     set opts(name) {}
     set opts(PROG) {}
@@ -476,9 +474,9 @@ proc run_dump_test { name {extra_options {}} } {
     set opts(error-output) {}
     set opts(warning) {}
     set opts(target) {}
-    set opts(not-target) {}
+    set opts(notarget) {}
     set opts(skip) {}
-    set opts(not-skip) {}
+    set opts(noskip) {}
     set opts(xfail) {}
     set opts(section-subst) {}
 
@@ -546,7 +544,6 @@ proc run_dump_test { name {extra_options {}} } {
                addr2line { set program addr2line }
                objdump { set program objdump }
                nm      { set program nm }
-               objcopy { set program objcopy }
                readelf { set program readelf }
                default {
                    perror "unrecognized program option $opts(PROG) in $file.d"
@@ -555,7 +552,7 @@ proc run_dump_test { name {extra_options {}} } {
            }
        } else {
            # Guess which program to run, by seeing which option was specified.
-           foreach p {objdump objcopy nm readelf addr2line} {
+           foreach p {objdump nm readelf addr2line} {
                if {$opts($p) != ""} {
                    if {$program != ""} {
                        perror "ambiguous dump program in $file.d"
@@ -575,11 +572,11 @@ proc run_dump_test { name {extra_options {}} } {
     }
 
     # Handle skipping the test on specified targets.
-    # You can have both skip/not-skip and target/not-target, but you can't
-    # have both skip and not-skip, or target and not-target, in the same file.
+    # You can have both skip/noskip and target/notarget, but you can't
+    # have both skip and noskip, or target and notarget, in the same file.
     if { $opts(skip) != "" } then {
-       if { $opts(not-skip) != "" } then {
-           perror "$testname: mixing skip and not-skip directives is invalid"
+       if { $opts(noskip) != "" } then {
+           perror "$testname: mixing skip and noskip directives is invalid"
            unresolved $testname
            return
        }
@@ -587,9 +584,9 @@ proc run_dump_test { name {extra_options {}} } {
            if {[match_target $glob]} { return }
        }
     }
-    if { $opts(not-skip) != "" } then {
+    if { $opts(noskip) != "" } then {
        set skip 1
-       foreach glob $opts(not-skip) {
+       foreach glob $opts(noskip) {
            if {[match_target $glob]} {
                set skip 0
                break
@@ -598,8 +595,8 @@ proc run_dump_test { name {extra_options {}} } {
        if {$skip} { return }
     }
     if { $opts(target) != "" } then {
-       if { $opts(not-target) != "" } then {
-           perror "$testname: mixing target and not-target directives is invalid"
+       if { $opts(notarget) != "" } then {
+           perror "$testname: mixing target and notarget directives is invalid"
            unresolved $testname
            return
        }
@@ -615,8 +612,8 @@ proc run_dump_test { name {extra_options {}} } {
            return
        }
     }
-    if { $opts(not-target) != "" } then {
-       foreach glob $opts(not-target) {
+    if { $opts(notarget) != "" } then {
+       foreach glob $opts(notarget) {
            if {[match_target $glob]} {
                unsupported $testname
                return
@@ -741,15 +738,8 @@ proc run_dump_test { name {extra_options {}} } {
     if { $progopts1 == "" } { set $progopts1 "-r" }
     verbose "running $binary $progopts $progopts1" 3
 
-    # Objcopy, unlike the other two, won't send its output to stdout,
-    # so we have to run it specially.
     set cmd "$binary $progopts $progopts1 dump.o"
     set redir ">dump.out"
-    if { $program == "objcopy" } {
-       set cmd "$binary $progopts $progopts1 dump.o dump.out"
-       set redir ""
-    }
-
     send_log "$cmd\n"
     set status [gas_host_run "$cmd" "$redir"]
     set comp_output [prune_warnings [lindex $status 1]]