[RFA]: minor change to gdb_test dejagnu proc
Michael Snyder
msnyder@cygnus.com
Tue Oct 17 15:02:00 GMT 2000
Fernando,
This is the change that you commented on earlier. It does NOT
cause any new tests to fail -- it only adds more info about
WHY the test failed. I happened to notice that gdb_test would
do this if a test failed due to ABNORMAL termination -- and
I thought it would be helpful if it also identified failures
due to NORMAL termination.
2000-10-17 Michael Snyder <msnyder@cleaver.cygnus.com>
* lib/gdb.exp (gdb_test): Add case to identify failures due to
"program exited normally". No new fails -- just more info.
Index: lib/gdb.exp
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/testsuite/lib/gdb.exp,v
retrieving revision 1.157
diff -c -3 -p -r1.157 gdb.exp
*** gdb.exp 2000/10/17 19:37:37 1.157
--- gdb.exp 2000/10/17 21:59:32
*************** proc gdb_test { args } {
*** 502,507 ****
--- 502,516 ----
fail "$errmsg"
return -1
}
+ -re "Program exited normally.*$gdb_prompt $" {
+ if ![string match "" $message] then {
+ set errmsg "$message: the program exited normally"
+ } else {
+ set errmsg "$command: the program exited normally"
+ }
+ fail "$errmsg"
+ return -1
+ }
-re "The program is not being run.*$gdb_prompt $" {
if ![string match "" $message] then {
set errmsg "$message: the program is no longer running"
More information about the Gdb-patches
mailing list