From 12dae58338149bc4ba0ede218c48e3133944eccb Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Thu, 22 Jun 2006 20:30:55 +0000 Subject: Merge testsuite ERROR fixes from HEAD. --- ChangeLog.csl | 11 ++++++++ gdb/testsuite/gdb.base/auxv.exp | 3 ++ gdb/testsuite/gdb.base/gdb1555.exp | 56 +++++++++---------------------------- gdb/testsuite/gdb.base/store.exp | 3 +- gdb/testsuite/gdb.stabs/exclfwd.exp | 6 ++++ 5 files changed, 35 insertions(+), 44 deletions(-) diff --git a/ChangeLog.csl b/ChangeLog.csl index 7136cc23696..d93fd4c6d3f 100644 --- a/ChangeLog.csl +++ b/ChangeLog.csl @@ -1,3 +1,14 @@ +2006-06-22 Daniel Jacobowitz + + gdb/testsuite/: + * gdb.base/store.exp: Don't use gdb_suppress_entire_file. + * gdb.base/gdb1555.exp: Use gdb_compile_shlib. Skip if not + native. + * gdb.stabs/exclfwd.exp: Skip the test if configure did not + enable stabs testing. + * gdb.base/auxv.exp: Intercept undefined command messages before + gdb_test_multiple does. + 2006-06-19 Nathan Sidwell * gdb/testsuite/ diff --git a/gdb/testsuite/gdb.base/auxv.exp b/gdb/testsuite/gdb.base/auxv.exp index 5187dd9ed3f..dd43d85cf99 100644 --- a/gdb/testsuite/gdb.base/auxv.exp +++ b/gdb/testsuite/gdb.base/auxv.exp @@ -139,6 +139,9 @@ gdb_test_multiple "gcore $gcorefile" "gcore" { -re "Can't create a corefile\[\r\n\]+$gdb_prompt $" { unsupported "gcore" } + -re "Undefined command: .*\[\r\n\]+$gdb_prompt $" { + unsupported "gcore" + } } # Let the program continue and die. diff --git a/gdb/testsuite/gdb.base/gdb1555.exp b/gdb/testsuite/gdb.base/gdb1555.exp index 8bea6329160..f7cfe7560fb 100644 --- a/gdb/testsuite/gdb.base/gdb1555.exp +++ b/gdb/testsuite/gdb.base/gdb1555.exp @@ -30,59 +30,29 @@ set libfile gdb1555 set srcfile ${testfile}.c set binfile ${objdir}/${subdir}/${testfile} -remote_exec build "rm -f ${binfile}" - -# get the value of gcc_compiled -if [get_compiler_info ${binfile}] { - return -1 -} - -if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}.o" object {debug}] != "" } { - return -1 -} +set libsrc "${srcdir}/${subdir}/${libfile}.c" +set libobj "${objdir}/${subdir}/${libfile}.so" +set execsrc "${srcdir}/${subdir}/${srcfile}" -# Build the shared libraries this test case needs. -# +remote_exec build "rm -f ${binfile}" -if {$gcc_compiled == 0} { - if [istarget "hppa*-hp-hpux*"] then { - set additional_flags "additional_flags=+z" - } elseif { [istarget "mips-sgi-irix*"] } { - # Disable SGI compiler's implicit -Dsgi - set additional_flags "additional_flags=-Usgi" - } else { - # don't know what the compiler is... - set additional_flags "" - } -} else { - if { ([istarget "powerpc*-*-aix*"] - || [istarget "rs6000*-*-aix*"]) } { - set additional_flags "" - } else { - set additional_flags "additional_flags=-fpic" - } +# Are we on a target board? No support for downloading shared libraries +# to a target yet. +if ![isnative] then { + return 0 } -set additional_flags "$additional_flags -shared" -if {[gdb_compile "${srcdir}/${subdir}/${libfile}.c" "${objdir}/${subdir}/${libfile}.so" executable [list debug $additional_flags "incdir=${objdir}"]] != ""} { +# get the value of gcc_compiled +if [get_compiler_info ${binfile}] { return -1 } -if { ($gcc_compiled -&& ([istarget "powerpc*-*-aix*"] -|| [istarget "rs6000*-*-aix*"] )) } { - set additional_flags "additional_flags=-L${objdir}/${subdir}" -} elseif { [istarget "mips-sgi-irix*"] } { - set additional_flags "additional_flags=-rpath ${objdir}/${subdir}" -} else { - set additional_flags "" -} - -if {[gdb_compile "${objdir}/${subdir}/${testfile}.o ${objdir}/${subdir}/${libfile}.so" "${binfile}" executable [list debug $additional_flags]] != ""} { +if { [gdb_compile_shlib $libsrc $libobj {debug}] != "" + || [gdb_compile $execsrc ${binfile} executable \ + [list debug shlib=${libobj}]] != "" } { return -1 } - gdb_exit gdb_start gdb_reinitialize_dir $srcdir/$subdir diff --git a/gdb/testsuite/gdb.base/store.exp b/gdb/testsuite/gdb.base/store.exp index 7b92eca3bf7..82bcb0dd035 100644 --- a/gdb/testsuite/gdb.base/store.exp +++ b/gdb/testsuite/gdb.base/store.exp @@ -30,7 +30,8 @@ set testfile "store" set srcfile ${testfile}.c set binfile ${objdir}/${subdir}/${testfile} if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { - gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail." + untested store.exp + return -1 } if [get_compiler_info ${binfile}] { diff --git a/gdb/testsuite/gdb.stabs/exclfwd.exp b/gdb/testsuite/gdb.stabs/exclfwd.exp index 05ab97c0fb0..9d500146393 100644 --- a/gdb/testsuite/gdb.stabs/exclfwd.exp +++ b/gdb/testsuite/gdb.stabs/exclfwd.exp @@ -21,6 +21,12 @@ if $tracelevel { strace $tracelevel } +# If the test directory was not created by configure then skip +# this test. +if ![file isdirectory ${objdir}/${subdir}] then { + return 0 +} + # # test running programs # -- cgit v1.2.1