public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
* [PATCHES] Warning handler and new basic tests
@ 2001-10-25 23:02 Keith Seitz
  0 siblings, 0 replies; only message in thread
From: Keith Seitz @ 2001-10-25 23:02 UTC (permalink / raw)
  To: Insight Maling List

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
+  }
 }

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-10-25 23:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-25 23:02 [PATCHES] Warning handler and new basic tests Keith Seitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).