aboutsummaryrefslogtreecommitdiff
path: root/lib/dg.exp
diff options
context:
space:
mode:
authorBen Elliston <bje@gnu.org>2011-03-01 21:19:29 +1100
committerBen Elliston <bje@gnu.org>2011-03-01 21:19:29 +1100
commitfd708571bd2853ea9ad8fcf15b22c0a71b57cd3a (patch)
treea5c21922fc6821f8662d8d951f7c16cba75d8b80 /lib/dg.exp
parent3589f41bba1f8df1f2f3e2a6fba7bc2674fb5778 (diff)
downloaddejagnu-fd708571bd2853ea9ad8fcf15b22c0a71b57cd3a.zip
dejagnu-fd708571bd2853ea9ad8fcf15b22c0a71b57cd3a.tar.gz
dejagnu-fd708571bd2853ea9ad8fcf15b22c0a71b57cd3a.tar.bz2
2011-03-01 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* lib/dg.exp (dg-test): Support nested calls.
Diffstat (limited to 'lib/dg.exp')
-rw-r--r--lib/dg.exp15
1 files changed, 9 insertions, 6 deletions
diff --git a/lib/dg.exp b/lib/dg.exp
index 7325df5..e3e07d9 100644
--- a/lib/dg.exp
+++ b/lib/dg.exp
@@ -671,10 +671,11 @@ proc dg-test { args } {
# Define our own "special function" `unknown' so we catch spelling errors.
# But first rename the existing one so we can restore it afterwards.
- catch {rename dg-save-unknown ""}
- rename unknown dg-save-unknown
- proc unknown { args } {
- return -code error "unknown dg option: $args"
+ if { [info procs dg-save-unknown] == [list] } {
+ rename unknown dg-save-unknown
+ proc unknown { args } {
+ return -code error "unknown dg option: $args"
+ }
}
set tmp [dg-get-options $prog]
@@ -698,8 +699,10 @@ proc dg-test { args } {
}
# Restore normal error handling.
- rename unknown ""
- rename dg-save-unknown unknown
+ if { [info procs dg-save-unknown] != [list] } {
+ rename unknown ""
+ rename dg-save-unknown unknown
+ }
# If we're not supposed to try this test on this target, we're done.
if { [lindex ${dg-do-what} 1] == "N" } {