* gdb.base/overlays.exp: Preliminary fixes; temporarily disabled
until it has been modified to work with the new testsuite. * gdb.*/*.exp: Instead of causing 1 unresolved test when the testcase won't compile, cause all of the testcases in the file to fail instead. * lib/gdb.exp(gdb_suppress_entire_file): New procedure. (gdb_clear_suppressed): New procedure. (gdb_stop_suppressing_tests): Only clear suppress_flag if it contains a positive value.
This commit is contained in:
parent
4ea71e9de9
commit
a6d380b997
4 changed files with 53 additions and 13 deletions
|
@ -1,3 +1,17 @@
|
|||
Sun Jun 29 16:43:30 1997 Bob Manson <manson@charmed.cygnus.com>
|
||||
|
||||
* gdb.base/overlays.exp: Preliminary fixes; temporarily disabled
|
||||
until it has been modified to work with the new testsuite.
|
||||
|
||||
* gdb.*/*.exp: Instead of causing 1 unresolved test when the
|
||||
testcase won't compile, cause all of the testcases in the file to
|
||||
fail instead.
|
||||
|
||||
* lib/gdb.exp(gdb_suppress_entire_file): New procedure.
|
||||
(gdb_clear_suppressed): New procedure.
|
||||
(gdb_stop_suppressing_tests): Only clear suppress_flag if
|
||||
it contains a positive value.
|
||||
|
||||
Sat Jun 28 13:31:11 1997 Bob Manson <manson@charmed.cygnus.com>
|
||||
|
||||
* lib/gdb.exp(default_gdb_start): Use gdb_opts host feature.
|
||||
|
|
|
@ -37,8 +37,7 @@ set testfile "mn10200"
|
|||
set srcfile ${srcdir}/${subdir}/${testfile}.s
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
if { [gdb_compile "${srcfile}" "${binfile}" executable ""] != "" } {
|
||||
perror "Couldn't compile ${srcfile}"
|
||||
return -1
|
||||
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
|
||||
}
|
||||
|
||||
proc add_tests { } {
|
||||
|
|
|
@ -1,3 +1,22 @@
|
|||
# Copyright (C) 1997 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
# Please email any bugs, comments, and/or additions to this file to:
|
||||
# bug-gdb@prep.ai.mit.edu
|
||||
|
||||
# Test that GDB properly ignores invalid stabs.
|
||||
# Also test that GDB can debug a .o file, and that it doesn't mind
|
||||
# a file that's more minimal than what a compiler normally puts out.
|
||||
|
@ -11,10 +30,6 @@ if ![file isdirectory ${objdir}/${subdir}] then {
|
|||
return 0
|
||||
}
|
||||
|
||||
if ![file exists ${objdir}/${subdir}/weird.s] {
|
||||
return 0
|
||||
}
|
||||
|
||||
set prms_id 0
|
||||
set bug_id 0
|
||||
|
||||
|
@ -28,7 +43,7 @@ proc do_tests {} {
|
|||
# will be lost.
|
||||
# Skip the rest of the stabs tests for this case.
|
||||
send_gdb "ptype inttype\n"
|
||||
expect {
|
||||
gdb_expect {
|
||||
-re "^ptype inttype\r*\ntype = inttype.*$gdb_prompt $" {
|
||||
pass "stabs found"
|
||||
}
|
||||
|
@ -198,7 +213,7 @@ proc print_weird_var { var } {
|
|||
# Make sure that the variable gets printed out correctly, without
|
||||
# any sort of warning message.
|
||||
send_gdb "print $var\n"
|
||||
expect {
|
||||
gdb_expect {
|
||||
-re "^print $var\r*\n.\[0-9\]* = 42.*$gdb_prompt $" {
|
||||
pass "variable $var printed properly"
|
||||
}
|
||||
|
@ -268,8 +283,7 @@ if { [lindex $exec_output 0] != 0 } {
|
|||
}
|
||||
|
||||
if { [gdb_compile "${srcfile}" "${binfile}" object ""] != "" } {
|
||||
perror "Couldn't compile ${srcfile}"
|
||||
return -1
|
||||
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
|
||||
}
|
||||
|
||||
remote_file build delete ${srcfile}
|
||||
|
@ -282,7 +296,7 @@ send_gdb "file $binfile\n"
|
|||
# But \[^\n\]* doesn't seem to work, so instead use the heuristic
|
||||
# that a filename won't contain a space and a warning message will.
|
||||
# But spaces following by backspaces aren't really spaces.
|
||||
expect {
|
||||
gdb_expect {
|
||||
-re "^file (\[^ \]| +\008)*\r*\nReading symbols from $binfile\.\.\.done\.\r*\n$gdb_prompt $" {
|
||||
pass "weirdx.o read without error"
|
||||
}
|
||||
|
|
|
@ -874,6 +874,13 @@ proc gdb_expect { args } {
|
|||
}
|
||||
}
|
||||
|
||||
proc gdb_suppress_entire_file { reason } {
|
||||
global suppress_flag;
|
||||
|
||||
warning "$reason\n";
|
||||
set suppress_flag -1;
|
||||
}
|
||||
|
||||
#
|
||||
# Set suppress_flag, which will cause all subsequent calls to send_gdb and
|
||||
# gdb_expect to fail immediately (until the next call to
|
||||
|
@ -900,7 +907,7 @@ proc gdb_stop_suppressing_tests { } {
|
|||
global suppress_flag;
|
||||
|
||||
if [info exists suppress_flag] {
|
||||
if { $suppress_flag != 0 } {
|
||||
if { $suppress_flag > 0 } {
|
||||
set suppress_flag 0;
|
||||
clone_output "Tests restarted.\n";
|
||||
}
|
||||
|
@ -909,6 +916,12 @@ proc gdb_stop_suppressing_tests { } {
|
|||
}
|
||||
}
|
||||
|
||||
proc gdb_clear_suppressed { } {
|
||||
global suppress_flag;
|
||||
|
||||
set suppress_flag 0;
|
||||
}
|
||||
|
||||
proc gdb_start { } {
|
||||
default_gdb_start
|
||||
}
|
||||
|
@ -932,7 +945,7 @@ proc gdb_continue { function } {
|
|||
}
|
||||
|
||||
proc default_gdb_init { args } {
|
||||
gdb_stop_suppressing_tests;
|
||||
gdb_clear_suppressed;
|
||||
|
||||
# Uh, this is lame. Really, really, really lame. But there's this *one*
|
||||
# testcase that will fail in random places if we don't increase this.
|
||||
|
|
Loading…
Reference in a new issue