summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2020-09-19 16:35:01 (GMT)
committerdgp <dgp@users.sourceforge.net>2020-09-19 16:35:01 (GMT)
commit8c327a0577a8db466b7e326aa45973b440c6108f (patch)
treeb549f14132cbde4925119fb089a370d49b177f14 /library
parent1d9b09692dbf8ea343c44f4cca02676ad091cb41 (diff)
parentac45c8d85147e6927979c08d95567504148b74cd (diff)
downloadtcl-8c327a0577a8db466b7e326aa45973b440c6108f.zip
tcl-8c327a0577a8db466b7e326aa45973b440c6108f.tar.gz
tcl-8c327a0577a8db466b7e326aa45973b440c6108f.tar.bz2
merge 8.6
Diffstat (limited to 'library')
-rw-r--r--library/tcltest/tcltest.tcl19
1 files changed, 14 insertions, 5 deletions
diff --git a/library/tcltest/tcltest.tcl b/library/tcltest/tcltest.tcl
index 2af79bc..e7f4288 100644
--- a/library/tcltest/tcltest.tcl
+++ b/library/tcltest/tcltest.tcl
@@ -2798,7 +2798,6 @@ proc tcltest::runAllTests { {shell ""} } {
variable numTests
variable failFiles
variable DefaultValue
- set failFilesAccum {}
FillFilesExisted
if {[llength [info level 0]] == 1} {
@@ -2854,8 +2853,18 @@ proc tcltest::runAllTests { {shell ""} } {
flush [outputChannel]
if {[singleProcess]} {
- incr numTestFiles
- uplevel 1 [list ::source $file]
+ if {[catch {
+ incr numTestFiles
+ uplevel 1 [list ::source $file]
+ } msg]} {
+ puts [outputChannel] "Test file error: $msg"
+ # append the name of the test to a list to be reported
+ # later
+ lappend testFileFailures $file
+ }
+ if {$numTests(Failed) > 0} {
+ set failFilesSet 1
+ }
} else {
# Pass along our configuration to the child processes.
# EXCEPT for the -outfile, because the parent process
@@ -2888,7 +2897,7 @@ proc tcltest::runAllTests { {shell ""} } {
}
if {$Failed > 0} {
lappend failFiles $testFile
- lappend failFilesAccum $testFile
+ set failFilesSet 1
}
} elseif {[regexp [join {
{^Number of tests skipped }
@@ -2935,7 +2944,7 @@ proc tcltest::runAllTests { {shell ""} } {
puts [outputChannel] ""
puts [outputChannel] [string repeat ~ 44]
}
- return [expr {[info exists testFileFailures] || [llength $failFilesAccum]}]
+ return [expr {[info exists testFileFailures] || [info exists failFilesSet]}]
}
#####################################################################