From 659518555272d23be5bc8a4950ad565d95b7b6a0 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 27 Nov 2012 17:26:11 +0000 Subject: binutils/testsuite/ * lib/binutils-common.exp (is_zlib_supported): New function. * lib/utils-lib.exp (run_dump_test): If as options include --compress-debug-sections and zlib is not available, report the test as unsupported. * binutils-all/compress.exp: Bail out if zlib is not available. * binutils-all/objdump.exp (objdump compressed debug): Mark unsupported if zlib is not available. * binutils-all/readelf.exp (readelf_compressed_wa_test): Likewise. gas/testsuite/ * lib/gas-defs.exp (run_dump_test): If as options include --compress-debug-sections and zlib is not available, report the test as unsupported. ld/testsuite/ * ld-elf/compress.exp: Bail out if zlib is not supported. * lib/ld-lib.exp (run_dump_test): If as options include --compress-debug-sections and zlib is not available, report the test as unsupported. --- ld/testsuite/ChangeLog | 7 +++++++ ld/testsuite/ld-elf/compress.exp | 4 ++++ ld/testsuite/lib/ld-lib.exp | 6 ++++++ 3 files changed, 17 insertions(+) (limited to 'ld/testsuite') diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index c859e89..12026a9 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -3,6 +3,13 @@ * ld-elf/flags1.d: Add *-*-nacl* to xfail list. * ld-elf/orphan-region.d: Likewise. +2012-11-27 Roland McGrath + + * ld-elf/compress.exp: Bail out if zlib is not supported. + * lib/ld-lib.exp (run_dump_test): If as options include + --compress-debug-sections and zlib is not available, report + the test as unsupported. + 2012-11-23 Alan Modra * ld-powerpc/plt1.d: Update for default "at" branch hints. diff --git a/ld/testsuite/ld-elf/compress.exp b/ld/testsuite/ld-elf/compress.exp index 1e13394..55269ee 100644 --- a/ld/testsuite/ld-elf/compress.exp +++ b/ld/testsuite/ld-elf/compress.exp @@ -25,6 +25,10 @@ if ![is_elf_format] { return } +if ![is_zlib_supported] { + return +} + # The following tests require running the executable generated by ld. if ![isnative] { return diff --git a/ld/testsuite/lib/ld-lib.exp b/ld/testsuite/lib/ld-lib.exp index 49837dd..3cb8ee1 100644 --- a/ld/testsuite/lib/ld-lib.exp +++ b/ld/testsuite/lib/ld-lib.exp @@ -757,6 +757,12 @@ proc run_dump_test { name {extra_options {}} } { set dfile $srcdir/$subdir/$opts(dump) } + if { [string match "*--compress-debug-sections*" $opts(as)] \ + && ![is_zlib_supported] } { + unsupported $testname + return + } + # Time to setup xfailures. foreach targ $opts(xfail) { setup_xfail $targ -- cgit v1.1