diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2012-08-16 20:31:34 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2012-08-16 20:31:34 +0000 |
commit | 58f594cdb752acbd9e5b910cd39f513bcd6ba800 (patch) | |
tree | 878e91a3418bd3f55cdc148735f71de84ac1b9c4 /binutils/testsuite/binutils-all/ar.exp | |
parent | 8baf7b78b5d92823965cad6263b0e0ea65c9cd36 (diff) | |
download | gdb-58f594cdb752acbd9e5b910cd39f513bcd6ba800.zip gdb-58f594cdb752acbd9e5b910cd39f513bcd6ba800.tar.gz gdb-58f594cdb752acbd9e5b910cd39f513bcd6ba800.tar.bz2 |
Add a testcase for PR binutils/14481
binutils/
PR binutils/14481
* Makefile.am (BFDTEST1_PROG): New.
(TEST_PROGS): Likewise.
(bfdtest1_DEPENDENCIES): Likewise.
(noinst_PROGRAMS): Add $(TEST_PROGS).
* Makefile.in: Regenerated.
* bfdtest1.c: New file.
binutils/testsuite/
PR binutils/14481
* ar.exp (bfdtest1): New.
(long_filenames): Run bfdtest1.
(thin_archive): Likewise.
(thin_archive_with_nested): Likewise.
Diffstat (limited to 'binutils/testsuite/binutils-all/ar.exp')
-rw-r--r-- | binutils/testsuite/binutils-all/ar.exp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/binutils/testsuite/binutils-all/ar.exp b/binutils/testsuite/binutils-all/ar.exp index 0caa847..c66c43e 100644 --- a/binutils/testsuite/binutils-all/ar.exp +++ b/binutils/testsuite/binutils-all/ar.exp @@ -27,6 +27,8 @@ if ![is_remote host] { } } +set bfdtest1 [findfile $base_dir/bfdtest1] + # send_user "Version [binutil_version $AR]" # Test long file name support @@ -34,6 +36,7 @@ if ![is_remote host] { proc long_filenames { } { global AR global host_triplet + global bfdtest1 set testname "ar long file names" @@ -124,6 +127,14 @@ proc long_filenames { } { return } + verbose -log "$bfdtest1 $dest" + set exec_output [binutils_run $bfdtest1 "$dest"] + if ![string match "" $exec_output] { + verbose -log $exec_output + fail "$testname (bfdtest1)" + return + } + if [is_remote host] { remote_upload host $n1 tmpdir/$n1 remote_upload host $n2 tmpdir/$n2 @@ -224,6 +235,7 @@ proc thin_archive { } { global NM global srcdir global subdir + global bfdtest1 set testname "ar thin archive" @@ -249,6 +261,14 @@ proc thin_archive { } { return } + verbose -log "$bfdtest1 $archive" + set exec_output [binutils_run $bfdtest1 "$archive"] + if ![string match "" $exec_output] { + verbose -log $exec_output + fail "$testname (bfdtest1)" + return + } + set got [binutils_run $NM "--print-armap $archive"] if { ![string match "*text_symbol in *bintest.o*" $got] \ || ![string match "*data_symbol in *bintest.o*" $got] \ @@ -271,6 +291,7 @@ proc thin_archive_with_nested { } { global NM global srcdir global subdir + global bfdtest1 set testname "ar thin archive with nested archive" @@ -306,6 +327,14 @@ proc thin_archive_with_nested { } { return } + verbose -log "$bfdtest1 $archive" + set exec_output [binutils_run $bfdtest1 "$archive"] + if ![string match "" $exec_output] { + verbose -log $exec_output + fail "$testname (bfdtest1)" + return + } + set got [binutils_run $NM "--print-armap $archive"] if { ![string match "*text_symbol in *bintest.o*" $got] \ || ![string match "*data_symbol in *bintest.o*" $got] \ |