Skip to content

Commit 9237170

Browse files
authored
test/with-term: log output before close (#1060)
We're seeing flakiness on tests relying on with-term. Output doesn't include what went wrong because it's all going to the terminal emulator. Log the output on failure.
1 parent 751dd20 commit 9237170

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

internal/termtest/with_term.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,11 @@ func WithTerm() {
9393
if err := emu.Close(); err != nil {
9494
log.Printf("%v: %v", cmd, err)
9595
exitCode = 1
96+
97+
log.Printf("## output before close:")
98+
for _, line := range emu.Rows() {
99+
log.Printf("## %v", line)
100+
}
96101
}
97102

98103
if *finalSnapshot != "" {

0 commit comments

Comments
 (0)