This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

only run gas cfi test on elf targets


gas/testsuite/ChangeLog
	* lib/gas-defs.exp (proc is_elf_format): Copy from ld testsuite.
	* gas/cfi/cfi.exp: Use here.  Only run tests when ELF.

Index: gas/testsuite/lib/gas-defs.exp
===================================================================
RCS file: /cvs/src/src/gas/testsuite/lib/gas-defs.exp,v
retrieving revision 1.12
diff -u -p -r1.12 gas-defs.exp
--- gas/testsuite/lib/gas-defs.exp	16 May 2003 16:30:25 -0000	1.12
+++ gas/testsuite/lib/gas-defs.exp	10 Jun 2003 13:27:45 -0000
@@ -182,6 +182,43 @@ proc gas_init { args } {
     return
 }
 
+#
+# is_elf_format
+#	true if the object format is known to be ELF
+#
+proc is_elf_format {} {
+    if { ![istarget *-*-sysv4*] \
+	 && ![istarget *-*-unixware*] \
+	 && ![istarget *-*-elf*] \
+	 && ![istarget *-*-eabi*] \
+	 && ![istarget hppa*64*-*-hpux*] \
+	 && ![istarget *-*-linux*] \
+	 && ![istarget *-*-irix5*] \
+	 && ![istarget *-*-irix6*] \
+	 && ![istarget *-*-netbsd*] \
+	 && ![istarget *-*-solaris2*] } {
+	return 0
+    }
+
+    if { [istarget *-*-linux*aout*] \
+	 || [istarget *-*-linux*oldld*] } {
+	return 0
+    }
+
+    if { ![istarget *-*-netbsdelf*] \
+	 && ([istarget *-*-netbsd*aout*] \
+	     || [istarget *-*-netbsdpe*] \
+	     || [istarget arm*-*-netbsd*] \
+	     || [istarget sparc-*-netbsd*] \
+	     || [istarget i*86-*-netbsd*] \
+	     || [istarget m68*-*-netbsd*] \
+	     || [istarget vax-*-netbsd*] \
+	     || [istarget ns32k-*-netbsd*]) } {
+    	return 0
+    }
+    return 1
+}
+
 
 # run_dump_test FILE (optional:) EXTRA_OPTIONS
 #
Index: gas/testsuite/gas/cfi/cfi.exp
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/cfi/cfi.exp,v
retrieving revision 1.5
diff -u -p -r1.5 cfi.exp
--- gas/testsuite/gas/cfi/cfi.exp	8 Jun 2003 03:59:44 -0000	1.5
+++ gas/testsuite/gas/cfi/cfi.exp	10 Jun 2003 13:27:43 -0000
@@ -12,35 +12,25 @@ proc run_list_test { name opts } {
     pass $testname
 }
 
-set any "0"
+if ![is_elf_format] then {
+    return
+}
 
 if [istarget "x86_64-*"] then {
     run_dump_test "cfi-x86_64"
-    set any "1"
-}
 
-if [istarget "i?86-*"] then {
+} elseif [istarget "i?86-*"] then {
     run_dump_test "cfi-i386"
-    set any "1"
-}
 
-if { [istarget alpha*-*-*] } then {
+} elseif { [istarget alpha*-*-*] } then {
+    run_dump_test "cfi-alpha-1"
+    run_dump_test "cfi-alpha-2"
+    run_dump_test "cfi-alpha-3"
 
-    set elf [expr [istarget *-*-elf*] \
-                  || [istarget *-*-linux*] \
-                  || [istarget *-*-freebsd*] \
-                  || [istarget *-*-netbsd*] ]
-
-    if $elf {
-	run_dump_test "cfi-alpha-1"
-	run_dump_test "cfi-alpha-2"
-	run_dump_test "cfi-alpha-3"
-	set any "1"
-    }
+} else {
+    return
 }
 
-if $any {
-    run_list_test "cfi-diag-1" ""
-    run_dump_test "cfi-common-1"
-    run_dump_test "cfi-common-2"
-}
+run_list_test "cfi-diag-1" ""
+run_dump_test "cfi-common-1"
+run_dump_test "cfi-common-2"

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]