summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2018-11-08 17:06:02 (GMT)
committerdgp <dgp@users.sourceforge.net>2018-11-08 17:06:02 (GMT)
commit5186226bf6a46b323612f5821b9433d69b1128d1 (patch)
tree1276568f508888f4871e918707673d5ca4d906fa /library
parenta323feab845a844ef1df998be53ffac8c92ad51b (diff)
downloadtcl-5186226bf6a46b323612f5821b9433d69b1128d1.zip
tcl-5186226bf6a46b323612f5821b9433d69b1128d1.tar.gz
tcl-5186226bf6a46b323612f5821b9433d69b1128d1.tar.bz2
[86d249bcba] Make sure that tcltest::runAllTests actually returns 1 on failure
Repairs TIP 525 implementation.
Diffstat (limited to 'library')
-rw-r--r--library/tcltest/tcltest.tcl4
1 files changed, 3 insertions, 1 deletions
diff --git a/library/tcltest/tcltest.tcl b/library/tcltest/tcltest.tcl
index 410aa24..d67a900 100644
--- a/library/tcltest/tcltest.tcl
+++ b/library/tcltest/tcltest.tcl
@@ -2752,6 +2752,7 @@ proc tcltest::runAllTests { {shell ""} } {
variable numTests
variable failFiles
variable DefaultValue
+ set failFilesAccum {}
FillFilesExisted
if {[llength [info level 0]] == 1} {
@@ -2841,6 +2842,7 @@ proc tcltest::runAllTests { {shell ""} } {
}
if {$Failed > 0} {
lappend failFiles $testFile
+ lappend failFilesAccum $testFile
}
} elseif {[regexp [join {
{^Number of tests skipped }
@@ -2887,7 +2889,7 @@ proc tcltest::runAllTests { {shell ""} } {
puts [outputChannel] ""
puts [outputChannel] [string repeat ~ 44]
}
- return [info exists testFileFailures]
+ return [expr {[info exists testFileFailures] || [llength $failFilesAccum]}]
}
#####################################################################