forked from Imagelibrary/binutils-gdb
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.
This commit is contained in:
@@ -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] \
|
||||
|
||||
Reference in New Issue
Block a user