From 54713545714ae9ba3d1815ce5dc99ec4b6386e0b Mon Sep 17 00:00:00 2001 From: dgp Date: Thu, 8 Nov 2018 17:05:00 +0000 Subject: [86d249bcba] Make sure that tcltest::runAllTests actually returns 1 on failure. Repairs TIP 525 Implementation. --- library/tcltest/tcltest.tcl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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]}] } ##################################################################### -- cgit v0.12