carlos / platform Public

tests: diagnostics print one line per t.Logf, so CI's summary keeps them

The gate's failure summary keeps only lines carrying a _test.go:N:
prefix, and the full log is truncated. The departure scan rig's
controller log (#733) and the DBForward tap trace were printed as
one multi-line message, so a CI failure showed only their headers.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev 76728f4c50534e439889e3c3693580512aec840e parent 8fd836a
2 files changed, +12 −2
  • dbforward_e2e_test.go +6 −1
  • internal/host/hadepartures_scan_test.go +6 −1

CI passed — run details

diff --git a/dbforward_e2e_test.go b/dbforward_e2e_test.go
index 3d589e3bc..31a8b6db2 100644
--- a/dbforward_e2e_test.go
+++ b/dbforward_e2e_test.go
@@ -529,7 +529,12 @@ func checkProgressAtTheCLI(t *testing.T, e *dbfE2E, tap *dbfTap, atLeast time.Du
err = cmd.Wait()
end := time.Now()
if err != nil || out.String() != "n\n3\n" {
- t.Fatalf("%q %v\n%s\ntap:\n%s", out.String(), err, strings.Join(stderr, "\n"), tap.trace())
+ // One t.Logf per line: the CI gate's summary keeps only lines
+ // carrying the test file's prefix.
+ for _, line := range strings.Split(tap.trace(), "\n") {
+ t.Logf("tap: %s", line)
+ }
+ t.Fatalf("%q %v\n%s", out.String(), err, strings.Join(stderr, "\n"))
}
if reading.IsZero() || reading.Sub(start) > time.Second {
t.Fatalf("DBF-11 after %s: %q", reading.Sub(start), stderr)
diff --git a/internal/host/hadepartures_scan_test.go b/internal/host/hadepartures_scan_test.go
index a9a003f83..27c4d03d7 100644
--- a/internal/host/hadepartures_scan_test.go
+++ b/internal/host/hadepartures_scan_test.go
@@ -79,7 +79,12 @@ func (l *scanLog) dumpOnFailure(t *testing.T) {
}
l.mu.Lock()
defer l.mu.Unlock()
- t.Logf("controller log (%d lines):\n%s", len(l.lines), strings.Join(l.lines, "\n"))
+ // One t.Logf per line: the CI gate's summary keeps only lines
+ // carrying the test file's prefix.
+ t.Logf("controller log (%d lines):", len(l.lines))
+ for _, line := range l.lines {
+ t.Logf(" %s", line)
+ }
})
}