]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gas: add new COFF-specific subdir in testsuite
authorJan Beulich <jbeulich@suse.com>
Fri, 2 May 2025 08:06:13 +0000 (10:06 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 2 May 2025 08:06:13 +0000 (10:06 +0200)
... and move the cofftag testcase there (from all/). Just like we have
one for ELF.

gas/testsuite/gas/all/gas.exp
gas/testsuite/gas/coff/coff.exp [new file with mode: 0644]
gas/testsuite/gas/coff/tag.d [moved from gas/testsuite/gas/all/cofftag.d with 99% similarity]
gas/testsuite/gas/coff/tag.s [moved from gas/testsuite/gas/all/cofftag.s with 99% similarity]

index f8bab3c2bd179081a8d26554a17cff3b325b405f..780838d246dc85e842f1f6f1ee130bdb23b76dcf 100644 (file)
@@ -330,21 +330,6 @@ switch -glob $target_triplet {
     }
 }
 
-# This test is for any COFF target.
-# We omit the ARM toolchains because they define locals to
-#  start with '.', which eliminates .eos, .text etc from the output.
-# Omit c54x, since .tag and .def mean something different on that target
-if {   ([istarget *-*-coff*] && ![istarget *c4x*-*-coff] && ![istarget *c54x*-*-coff]) \
-     ||([istarget *-*-pe*] && ![istarget arm*-*-pe*]) \
-     || [istarget i*86-*-aix*] \
-     || [istarget i*86-*-go32*] \
-     || [istarget i*86-*-cygwin*] \
-     || [istarget x86_64-*-mingw*] \
-     || [istarget i*86-*-*nt] \
-     || [istarget i*86-*-interix*] } {
-    run_dump_test cofftag
-}
-
 # Test omitting conditionals from listings.
 proc test_cond {} {
     global comp_output
diff --git a/gas/testsuite/gas/coff/coff.exp b/gas/testsuite/gas/coff/coff.exp
new file mode 100644 (file)
index 0000000..0ef8044
--- /dev/null
@@ -0,0 +1,32 @@
+# Copyright (C) 2012-2025 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+
+#
+# coff tests
+#
+
+if { ![is_coff_format] } then {
+    return
+}
+
+# We omit the ARM toolchains because they define locals to start with '.',
+#  which eliminates .eos, .text etc from the output.
+# Also omit c4x and c54x, since .tag and .def mean something different there.
+if {    ![istarget arm*-*-*]
+     && ![istarget *c4x*-*-*]
+     && ![istarget *c54x*-*-*] } {
+    run_dump_test tag
+}
similarity index 99%
rename from gas/testsuite/gas/all/cofftag.d
rename to gas/testsuite/gas/coff/tag.d
index 2d2a4ccfdb81a8eebea1866d8eef78e4bebc07c8..e366d4f94a2ee323554298df02611405778d1e8b 100644 (file)
@@ -5,7 +5,7 @@
 
 SYMBOL TABLE:
 \[  0\]\(sec -2\)\(fl 0x00\)\(ty    0\)\(scl 103\) \(nx 1\) 0x0+0000 foo.c
-File 
+File *
 \[  2\]\(sec  1\)\(fl 0x00\)\(ty    0\)\(scl   6\) \(nx 0\) 0x0+0000 gcc2_compiled.
 \[  3\]\(sec  1\)\(fl 0x00\)\(ty    0\)\(scl   6\) \(nx 0\) 0x0+0000 ___gnu_compiled_c
 \[  4\]\(sec -2\)\(fl 0x00\)\(ty    a\)\(scl  15\) \(nx 1\) 0x0+0000 _token
similarity index 99%
rename from gas/testsuite/gas/all/cofftag.s
rename to gas/testsuite/gas/coff/tag.s
index 814d3edeeda041b9e35be7089c380bac8f8b658a..a17c7f55234a201229cf4a0e5d870e4408942f54 100644 (file)
@@ -4,7 +4,7 @@
                operator,
                flags
        };
-        
+
        enum token what= operator;
 
    Type numbers have been converted to decimal to make this test pass on