diff --git a/parser/gotest/gotest.go b/parser/gotest/gotest.go index 9e6143d..1894758 100644 --- a/parser/gotest/gotest.go +++ b/parser/gotest/gotest.go @@ -191,6 +191,9 @@ func (p *Parser) parseLine(line string) (events []Event) { return p.pauseTest(strings.TrimSpace(line[10:])) } else if strings.HasPrefix(line, "=== CONT ") { return p.contTest(strings.TrimSpace(line[9:])) + } else if strings.HasPrefix(line, "=== NAME ") { + // for compatibility with gotest 1.20+ https://go-review.git.corp.google.com/c/go/+/443596 + return p.contTest(strings.TrimSpace(line[9:])) } else if matches := regexEndTest.FindStringSubmatch(line); len(matches) == 5 { return p.endTest(line, matches[1], matches[2], matches[3], matches[4]) } else if matches := regexStatus.FindStringSubmatch(line); len(matches) == 2 { diff --git a/parser/gotest/gotest_test.go b/parser/gotest/gotest_test.go index e4ec5a5..c6300d9 100644 --- a/parser/gotest/gotest_test.go +++ b/parser/gotest/gotest_test.go @@ -44,6 +44,10 @@ var parseLineTests = []parseLineTest{ "=== CONT TestOne", []Event{{Type: "cont_test", Name: "TestOne"}}, }, + { + "=== NAME TestOne", + []Event{{Type: "cont_test", Name: "TestOne"}}, + }, { "--- PASS: TestOne (12.34 seconds)", []Event{{Type: "end_test", Name: "TestOne", Result: "PASS", Duration: 12_340 * time.Millisecond}},