From c1c94e44379f02e1007a4351ce6c40b17a352b4a Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 7 Nov 2018 18:50:09 +0000 Subject: [86d249bcba] Make sure that tcltest::runAllTests actually returns 1 on failure --- 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