This is the mail archive of the
insight@sources.redhat.com
mailing list for the Insight project.
[PATCHES] Warning handler and new basic tests
- To: Insight Maling List <insight at sources dot redhat dot com>
- Subject: [PATCHES] Warning handler and new basic tests
- From: Keith Seitz <keiths at cygnus dot com>
- Date: Thu, 25 Oct 2001 23:02:36 -0700 (PDT)
Hi,
I've committed two patches: one to gdb/testsuite/gdb.gdbtk/defs which adds
a new default warning handler. This prevernts gdb from displaying a
warning dialog while the testsuite is running. Instead, you'll see
"INSIGHT WARNING: <message>" in the testsuite output.
I've also checked in a new testsuite file which does some basic sanity
checking: can we open all aux windows and given times (before loading a
file, after loading a file, after running).
Keith
ChangeLog
2001-10-25 Keith Seitz <keiths@redhat.com>
* defs (_report_error): Fix typo.
(show_warning): Redefine the standard warning handler
so that we don't end up stalling tests with a warning dialog.
* windows.exp: New file.
* windows.test: New file.
Patch (to defs)
Index: defs
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.gdbtk/defs,v
retrieving revision 1.2
diff -u -p -p -r1.2 defs
--- defs 2001/05/07 20:39:32 1.2
+++ defs 2001/10/26 05:59:20
@@ -122,7 +122,7 @@ proc gdbtk_test_run {{prog_args {}}} {
proc _report_error {msg} {
global _test
- if {[info exists _tesst(interactive)] && $_test(interactive)} {
+ if {[info exists _test(interactive)] && $_test(interactive)} {
# Dialog
tk_messageBox -message $msg -icon error -type ok
} else {
@@ -291,4 +291,16 @@ proc gdbtk_test_error {desc} {
set desc [join [split $desc \n] |]
puts "ERROR \{$desc\} \{\} \{\}"
gdbtk_test_done
+}
+
+# Override the warning dialog. We don't want to see them.
+rename show_warning real_show_warning
+proc show_warning {msg} {
+ global _test
+
+ set str "INSIGHT TESTSUITE WARNING: $msg"
+ puts stdout $str
+ if {$_test(logfile) != ""} {
+ puts $_test(logfile) $str
+ }
}