aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2008-07-26 01:15:42 +0000
committerAlan Modra <amodra@gmail.com>2008-07-26 01:15:42 +0000
commit22bce68eb8e2851d71960977a4cc70d2ec0b99c4 (patch)
treec64d03cf526947f9f4881c879d318da253fe1cc5
parent848c6a24d5bff3e897985de81e60ff7d8f20c485 (diff)
downloadfsf-binutils-gdb-22bce68eb8e2851d71960977a4cc70d2ec0b99c4.zip
fsf-binutils-gdb-22bce68eb8e2851d71960977a4cc70d2ec0b99c4.tar.gz
fsf-binutils-gdb-22bce68eb8e2851d71960977a4cc70d2ec0b99c4.tar.bz2
* binutils-all/objdump.exp: Run compressed debug test only for ELF.
-rw-r--r--binutils/testsuite/ChangeLog4
-rw-r--r--binutils/testsuite/binutils-all/objdump.exp64
2 files changed, 37 insertions, 31 deletions
diff --git a/binutils/testsuite/ChangeLog b/binutils/testsuite/ChangeLog
index 1a265be..2b4fdac 100644
--- a/binutils/testsuite/ChangeLog
+++ b/binutils/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2008-07-26 Alan Modra <amodra@bigpond.net.au>
+
+ * binutils-all/objdump.exp: Run compressed debug test only for ELF.
+
2008-07-11 Hans-Peter Nilsson <hp@axis.com>
* binutils-all/objdump.W: Generalize to adjust for targets with
diff --git a/binutils/testsuite/binutils-all/objdump.exp b/binutils/testsuite/binutils-all/objdump.exp
index b9416a4..59f217b 100644
--- a/binutils/testsuite/binutils-all/objdump.exp
+++ b/binutils/testsuite/binutils-all/objdump.exp
@@ -1,5 +1,5 @@
# Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2007
+# 2003, 2004, 2007, 2008
# Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
@@ -160,47 +160,49 @@ 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]
+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 {
- set compressed_testfile tmpdir/dw2-compressed.o
-}
+ 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"]
+ 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 { [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"
-}
+ 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
+ # 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"]
+ 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 { [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"
+ 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.
# Tests could be written for specific targets, and that should be done