Skip to content

Commit e8d625a

Browse files
authored
Ignore start event added in go1.20 (#89)
1 parent d398250 commit e8d625a

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

parse/event.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ const (
187187
ActionFail Action = "fail" // test or benchmark failed
188188
ActionOutput Action = "output" // test printed output
189189
ActionSkip Action = "skip" // test was skipped or the package contained no tests
190+
ActionStart Action = "start" // the start at the beginning of each test program's execution
190191
)
191192

192193
func (a Action) String() string {

parse/process.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,13 @@ func (s *GoTestSummary) AddEvent(e *Event) {
117117
if e.Action == ActionOutput && e.DiscardOutput() {
118118
return
119119
}
120+
// Added in go1.20 to denote the begining of each test program's execution.
121+
// ref: https://go.dev/doc/go1.20#tools
122+
// TODO(mf): we should record this internally, but to fix malformed output
123+
// this ignores this action event for now.
124+
if e.Action == ActionStart {
125+
return
126+
}
120127
pkg, ok := s.Packages[e.Package]
121128
if !ok {
122129
pkg = newPackage()

0 commit comments

Comments
 (0)