sqlite/conformance: keep each file's output in logs/ and print only summaries

With every test line printed, a run writes about 38 MB to the console.
In CI the step died without any exit status after the largest files
(fuzz.test with 35,035 tests, json106.test with 45,000) had printed their
output, while the same run completes locally under both TCL 8.6 and 9.0.

all.test now writes each file's full output to logs/NAME.log and prints
only the file's summary line, its failed-test list, and any abort, crash
or hang line; TURSO_TCL_VERBOSE=1 restores the full output. The
conformance workflow uploads the logs directory as an artifact so a
failure can still be read in full.
This commit is contained in:
Pekka Enberg
2026-09-13 11:21:11 +03:00
parent 1e35a22f80
commit bc8be2f88b
4 changed files with 38 additions and 1 deletions

View File

@@ -80,3 +80,10 @@ jobs:
run: make -C bindings/tcl build
- name: Run SQLite TCL conformance tests
run: tclsh sqlite/conformance/upstream/all.test
- name: Upload per-file test logs
if: always()
uses: actions/upload-artifact@v4
with:
name: sqlite-tcl-logs
path: sqlite/conformance/upstream/logs/
if-no-files-found: ignore

1
.gitignore vendored
View File

@@ -112,3 +112,4 @@ postgres/regress/results/
# Amp orb runtime files
.amp/portals/*
sqlite/conformance/upstream/logs/

View File

@@ -60,6 +60,12 @@ A file that runs longer than `file_timeout_seconds` (180 by default) is
killed and shows as `XHANG`; a file whose process dies on a signal shows
as `XCRASH`. Neither takes down the rest of the run.
The full output of each file is written to `logs/NAME.log`; the console
shows only each file's summary, failed-test list, and any abort, crash
or hang line, because the complete output of a run is tens of megabytes.
Set `TURSO_TCL_VERBOSE=1` to print everything. CI uploads the `logs`
directory as the `sqlite-tcl-logs` artifact.
`lock_common.tcl`, `malloc_common.tcl`, `bc_common.tcl`, `fuzz_common.tcl`
and `wal_common.tcl` are the upstream helper files. The one change is in
`lock_common.tcl`: the child processes it starts for multi-connection

View File

@@ -894,6 +894,8 @@ if {![info exists file_timeout_seconds]} {
if {![info exists hang_timeout_seconds]} {
set hang_timeout_seconds 30
}
set __runner_logdir [file join $testdir logs]
file mkdir $__runner_logdir
set __runner_hang_completed [list]
# The list above mixes 2-field (pass/fail) and 3-field (skip + reason)
@@ -956,7 +958,28 @@ while {$__runner_i < [llength $test_files]} {
}
fconfigure $__runner_chan -blocking 1
set __runner_rc [catch {close $__runner_chan} __runner_err __runner_opts]
puts $__runner_out
# The full output of every file goes to logs/NAME.log. The console gets
# the file's summary, its failed-test list, and any abort, crash or hang
# line: with every test line printed, a run writes tens of megabytes to
# the console, which is more than CI log capture copes with. Set
# TURSO_TCL_VERBOSE=1 to print everything.
set __runner_log [open [file join $__runner_logdir $__runner_name.log] w]
puts -nonewline $__runner_log $__runner_out
close $__runner_log
if {[info exists env(TURSO_TCL_VERBOSE)] && $env(TURSO_TCL_VERBOSE) ne ""} {
puts $__runner_out
} else {
puts "$__runner_name.test:"
foreach __runner_line [split $__runner_out \n] {
if {[regexp {^(All \d+ tests passed!|\d+ errors out of \d+ tests|Failed tests: |ABORTED: |thread '.*' panicked at )} $__runner_line]
|| [string match "*panicked at*" $__runner_line]} {
if {[string length $__runner_line] > 400} {
set __runner_line "[string range $__runner_line 0 399]... ([string length $__runner_line] bytes)"
}
puts " $__runner_line"
}
}
}
if {$__runner_timed_out} {
puts "HANG in $__runner_name.test: killed after $__runner_timeout seconds"
} elseif {$__runner_rc