From 1dc3124160fd7c59519c640c0704be7ba6bf7259 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Wed, 16 Sep 2020 12:17:54 +0000 Subject: Proposed solution for [835c93c000]: TIP #525 only implemented for non-singleproc case --- library/tcltest/tcltest.tcl | 19 ++++++++++++++----- 1 file 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]}] } ##################################################################### -- cgit v0.12 From e14285c3a1d7dd2d7407fda5a5c841ccb5cae488 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 17 Sep 2020 08:37:09 +0000 Subject: Tcl 8.6 should not be tested with "package prefer latest" any more: All included packages are supposed to be stable. Not to be merged to 8.7 (which still contains unstable packages) --- tests/all.tcl | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/all.tcl b/tests/all.tcl index 52c8763..5ac2abb 100644 --- a/tests/all.tcl +++ b/tests/all.tcl @@ -10,7 +10,6 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. -package prefer latest package require Tcl 8.5- package require tcltest 2.5 namespace import ::tcltest::* -- cgit v0.12