Skip to content

Commit

Permalink
Attempt to fix missing termtest log
Browse files Browse the repository at this point in the history
  • Loading branch information
Naatan committed Aug 31, 2023
1 parent e61e47a commit 75af502
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/integration/performance_int_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package integration
import (
"bytes"
"fmt"
"io"
"log"
"regexp"
"sort"
Expand Down Expand Up @@ -67,9 +68,11 @@ func performanceTest(commands []string, expect string, samples int, maxTime time
cp.Expect(expect)
}
cp.ExpectExitCode(0)
logs, err := io.ReadAll(termtestLogs)
suite.NoError(err)
v := rx.FindStringSubmatch(cp.Output())
if len(v) < 2 {
suite.T().Fatalf("Could not find '%s' in output:\n%s\n\ntermtest logs:\n%s", rx.String(), cp.Output(), termtestLogs.String())
suite.T().Fatalf("Could not find '%s' in output:\n%s\n\ntermtest logs:\n%s", rx.String(), cp.Output(), logs)
}
durMS, err := strconv.Atoi(v[1])
suite.Require().NoError(err)
Expand Down

0 comments on commit 75af502

Please sign in to comment.