aboutsummaryrefslogtreecommitdiff
path: root/runtest.exp
diff options
context:
space:
mode:
authorJacob Bachmeyer <jcb62281+dev@gmail.com>2020-06-18 18:52:33 -0500
committerJacob Bachmeyer <jcb62281+dev@gmail.com>2020-06-18 18:52:33 -0500
commitd45310cd257d399b8208fa9907f7c9f2f4ac7eda (patch)
tree8029856e854d431328a33e7ae87ab4d5f48c5cd3 /runtest.exp
parentcbba4dbb8d52c5b0f32e803cf8587f276ee1ec86 (diff)
downloaddejagnu-d45310cd257d399b8208fa9907f7c9f2f4ac7eda.zip
dejagnu-d45310cd257d399b8208fa9907f7c9f2f4ac7eda.tar.gz
dejagnu-d45310cd257d399b8208fa9907f7c9f2f4ac7eda.tar.bz2
Use consistent behavior for Tcl errors in test scripts
Diffstat (limited to 'runtest.exp')
-rw-r--r--runtest.exp6
1 files changed, 6 insertions, 0 deletions
diff --git a/runtest.exp b/runtest.exp
index 028ad5b..245c536 100644
--- a/runtest.exp
+++ b/runtest.exp
@@ -1562,6 +1562,7 @@ proc runtest { test_file_name } {
global bug_id
global test_result
global errcnt
+ global errorCode
global errorInfo
global tool
global testdir
@@ -1596,10 +1597,15 @@ proc runtest { test_file_name } {
# increments `errcnt'. If we do call perror we'd have to
# reset errcnt afterwards.
clone_output "ERROR: tcl error sourcing $test_file_name."
+ if {[info exists errorCode]} {
+ clone_output "ERROR: tcl error code $errorCode"
+ }
if {[info exists errorInfo]} {
clone_output "ERROR: $errorInfo"
unset errorInfo
}
+ unresolved "testcase '$test_file_name' aborted due to Tcl error"
+ if { ! $::dejagnu::opt::keep_going } { log_and_exit }
}
if {[info exists tool]} {