diff options
author | Joel Brobecker <brobecker@gnat.com> | 2010-02-08 11:33:54 +0000 |
---|---|---|
committer | Joel Brobecker <brobecker@gnat.com> | 2010-02-08 11:33:54 +0000 |
commit | 7b356089ca4ec42d7ac39dabfb065801ccb9598e (patch) | |
tree | 67227a05c44126d9613cda176388d648b2e0a7d0 | |
parent | 06988dfc57d0d03fd576e5949f52b8745278c0ab (diff) | |
download | gdb-7b356089ca4ec42d7ac39dabfb065801ccb9598e.zip gdb-7b356089ca4ec42d7ac39dabfb065801ccb9598e.tar.gz gdb-7b356089ca4ec42d7ac39dabfb065801ccb9598e.tar.bz2 |
* lib/gdb.exp (gdb_test_timeout): New global variable.
Set it to timeout if not already set.
(gdb_init): Reset the value of timeout to gdb_test_timeout.
-rw-r--r-- | gdb/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/testsuite/lib/gdb.exp | 15 |
2 files changed, 21 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 50b6966..f323e65 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2010-02-08 Joel Brobecker <brobecker@adacore.com> + + * lib/gdb.exp (gdb_test_timeout): New global variable. + Set it to timeout if not already set. + (gdb_init): Reset the value of timeout to gdb_test_timeout. + 2010-02-05 Doug Evans <dje@google.com> * lib/gdb.exp (INTERNAL_GDBFLAGS): Don't override value provided by diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 0145afb..a42d551 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -2413,7 +2413,22 @@ proc default_gdb_init { args } { } } +# The default timeout used when testing GDB commands. We want to use +# the same timeout as the default dejagnu timeout, unless the user has +# already provided a specific value (probably through a site.exp file). +global gdb_test_timeout +if ![info exists gdb_test_timeout] { + set gdb_test_timeout $timeout +} + proc gdb_init { args } { + # Reset the timeout value to the default. This way, any testcase + # that changes the timeout value without resetting it cannot affect + # the timeout used in subsequent testcases. + global gdb_test_timeout + global timeout + set timeout $gdb_test_timeout + return [eval default_gdb_init $args]; } |