Overview
| Artifact ID: | ae4ebe8f6c8204e5a88a3341989a918a0cae0fc2 |
|---|---|
| Ticket: | 2794560fffffffffffffffffffffffffffffffff
non-empty return from [runAllTests] - indicate status |
| User & Date: | eriklns on 2013-01-19 21:12:31 |
Changes
- icomment:
I agree with the need for [runAllTests] returning information regarding succes/failure. I supply a patch that improves upon the previous patch as follows: Besides failed tests, the new patch additionally takes into account any test file failures. It differentiates between the two types of failure with the sign of the numeric result. (I didn't find the option "attach a file" to this issue tracker. Therefore, like Larry McVoy, I just copy the text of the patch into this comment:) --- tcltest.tcl.orig2013-01-19 14:01:28.000000000 +0100 +++ tcltest.tcl2013-01-19 14:08:58.000000000 +0100 @@ -2833,6 +2833,21 @@ } } + # Prepare a result, indicating whether all is well + # (i.e. no test file failures and no failed tests). + # + # The result is a single integer, where: + # - a negative number indicates the number of test file failures + # (ignoring the number of failed tests). + # - a positive number indicates the number of failed tests, + # given zero test file failures. + # - zero indicates no failures at all + # + if {![info exists testFileFailures] || + ![set result [llength $testFileFailures]]} { + set result $numTests(Failed) + } + # cleanup puts [outputChannel] "\nTests ended at [eval $timeCmd]" cleanupTests 1 @@ -2856,7 +2871,7 @@ puts [outputChannel] "" puts [outputChannel] [string repeat ~ 44] } - return + return $result } ##################################################################### - login: "eriklns"
- mimetype: "text/plain"
- username: "eriklns"