Skip to content

Commit

Permalink
Ignore start event added in go1.20 (#89)
Browse files Browse the repository at this point in the history
  • Loading branch information
mfridman authored Feb 7, 2023
1 parent d398250 commit e8d625a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions parse/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ const (
ActionFail Action = "fail" // test or benchmark failed
ActionOutput Action = "output" // test printed output
ActionSkip Action = "skip" // test was skipped or the package contained no tests
ActionStart Action = "start" // the start at the beginning of each test program's execution
)

func (a Action) String() string {
Expand Down
7 changes: 7 additions & 0 deletions parse/process.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,13 @@ func (s *GoTestSummary) AddEvent(e *Event) {
if e.Action == ActionOutput && e.DiscardOutput() {
return
}
// Added in go1.20 to denote the begining of each test program's execution.
// ref: https://go.dev/doc/go1.20#tools
// TODO(mf): we should record this internally, but to fix malformed output
// this ignores this action event for now.
if e.Action == ActionStart {
return
}
pkg, ok := s.Packages[e.Package]
if !ok {
pkg = newPackage()
Expand Down

0 comments on commit e8d625a

Please sign in to comment.