This is the mail archive of the binutils@sourceware.org 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]

run objdump compressed debug test only for ELF


	* binutils-all/objdump.exp: Run compressed debug test only for ELF.

Index: binutils/testsuite/binutils-all/objdump.exp
===================================================================
RCS file: /cvs/src/src/binutils/testsuite/binutils-all/objdump.exp,v
retrieving revision 1.23
diff -u -p -r1.23 objdump.exp
--- binutils/testsuite/binutils-all/objdump.exp	10 Jul 2008 01:32:23 -0000	1.23
+++ binutils/testsuite/binutils-all/objdump.exp	24 Jul 2008 07:21:57 -0000
@@ -160,46 +160,48 @@ if [regexp $want $got] then {
 
 # Test objdump -s on a file that contains a compressed .debug section
 
-if {![binutils_assemble $srcdir/$subdir/dw2-compressed.S tmpdir/dw2-compressed.o]} then {
-    return
-}
-if [is_remote host] {
-    set compressed_testfile [remote_download host tmpdir/dw2-compressed.o]
-} else {
-    set compressed_testfile tmpdir/dw2-compressed.o
-}
-
-set got [remote_exec host "$OBJDUMP $OBJDUMPFLAGS -s -j .zdebug_abbrev $compressed_testfile" "" "/dev/null" "objdump.out"]
-
-if { [lindex $got 0] != 0 || ![string match "" [lindex $got 1]] } then {
-    fail "objdump -s -j .zdebug_abbrev (reason: unexpected output)"
-    send_log $got
-    send_log "\n"
-}
-
-if { [regexp_diff objdump.out $srcdir/$subdir/objdump.s] } then {
-    fail "objdump -s -j .zdebug_abbrev"
+if { ![is_elf_format] } then {
+    unsupported "objdump compressed debug"
+} elseif { ![binutils_assemble $srcdir/$subdir/dw2-compressed.S tmpdir/dw2-compressed.o] } then {
+    fail "objdump compressed debug"
 } else {
-    pass "objdump -s -j .zdebug_abbrev"
+    if [is_remote host] {
+	set compressed_testfile [remote_download host tmpdir/dw2-compressed.o]
+    } else {
+	set compressed_testfile tmpdir/dw2-compressed.o
+    }
+
+    set got [remote_exec host "$OBJDUMP $OBJDUMPFLAGS -s -j .zdebug_abbrev $compressed_testfile" "" "/dev/null" "objdump.out"]
+
+    if { [lindex $got 0] != 0 || ![string match "" [lindex $got 1]] } then {
+	fail "objdump -s -j .zdebug_abbrev (reason: unexpected output)"
+	send_log $got
+	send_log "\n"
+    }
+
+    if { [regexp_diff objdump.out $srcdir/$subdir/objdump.s] } then {
+	fail "objdump -s -j .zdebug_abbrev"
+    } else {
+	pass "objdump -s -j .zdebug_abbrev"
+    }
+
+    # Test objdump -W on a file that contains some compressed .debug sections
+
+    set got [remote_exec host "$OBJDUMP $OBJDUMPFLAGS -W $compressed_testfile" "" "/dev/null" "objdump.out"]
+
+    if { [lindex $got 0] != 0 || ![string match "" [lindex $got 1]] } then {
+	fail "objdump -W (reason: unexpected output)"
+	send_log $got
+	send_log "\n"
+    }
+
+    if { [regexp_diff objdump.out $srcdir/$subdir/objdump.W] } then {
+	fail "objdump -W"
+    } else {
+	pass "objdump -W"
+    }
 }
 
-# Test objdump -W on a file that contains some compressed .debug sections
-
-set got [remote_exec host "$OBJDUMP $OBJDUMPFLAGS -W $compressed_testfile" "" "/dev/null" "objdump.out"]
-
-if { [lindex $got 0] != 0 || ![string match "" [lindex $got 1]] } then {
-    fail "objdump -W (reason: unexpected output)"
-    send_log $got
-    send_log "\n"
-}
-
-if { [regexp_diff objdump.out $srcdir/$subdir/objdump.W] } then {
-    fail "objdump -W"
-} else {
-    pass "objdump -W"
-}
-
-
 
 # Options which are not tested: -a -d -D -R -T -x -l --stabs
 # I don't see any generic way to test any of these other than -a.

-- 
Alan Modra
Australia Development Lab, IBM


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