summaryrefslogtreecommitdiffstats
path: root/library/tcltest/tcltest.tcl
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2018-11-08 17:05:00 (GMT)
committerdgp <dgp@users.sourceforge.net>2018-11-08 17:05:00 (GMT)
commit54713545714ae9ba3d1815ce5dc99ec4b6386e0b (patch)
tree5ce222c4f9ced03a603033f102f142e7971ac462 /library/tcltest/tcltest.tcl
parentb3dceb53606507960d33a6a90dfcb94c720ace30 (diff)
downloadtcl-54713545714ae9ba3d1815ce5dc99ec4b6386e0b.zip
tcl-54713545714ae9ba3d1815ce5dc99ec4b6386e0b.tar.gz
tcl-54713545714ae9ba3d1815ce5dc99ec4b6386e0b.tar.bz2
[86d249bcba] Make sure that tcltest::runAllTests actually returns 1 on failure.
Repairs TIP 525 Implementation.
Diffstat (limited to 'library/tcltest/tcltest.tcl')
-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]}]
}
#####################################################################