View Ticket
Ticket Hash: 64cdb7621260855edf46e074d3520d282d3d8cfd
Title: tests/all.tcl always succeeds
Status: Open Type: Code Defect
Severity: Important Priority: Immediate
Subsystem: Resolution: Open
Last Modified: 2023-11-20 02:45:02
Version Found In: 1.7.22
User Comments:
doofus added on 2023-11-20 02:43:51:

Even if all tests were to fail, the script all.tcl would still exit with code 0...

That breaks automation, because the caller does not know of any test-failures.

The patch below addresses this problem:

--- tests/all.tcl       2020-10-12 16:39:22.000000000 -0400
+++ tests/all.tcl       2023-11-19 21:19:34.128221000 -0500
@@ -55,5 +55,5 @@
 # cleanup
 puts stdout "\nTests ended at [eval $timeCmd]"
+set failCount [llength $::tcltest::failFiles]
 ::tcltest::cleanupTests 1
-return
-
+exit [expr $failCount > 0]