diff --git a/pkg/gtr/builder.go b/pkg/gtr/builder.go index cda1811..a083ad8 100644 --- a/pkg/gtr/builder.go +++ b/pkg/gtr/builder.go @@ -58,6 +58,14 @@ func (b *ReportBuilder) CreateTest(name string) { b.tests[b.newId()] = Test{Name: name} } +func (b *ReportBuilder) PauseTest(name string) { + b.lastId = 0 +} + +func (b *ReportBuilder) ContinueTest(name string) { + b.lastId = b.findTest(name) +} + func (b *ReportBuilder) EndTest(name, result string, duration time.Duration) { id := b.findTest(name) b.lastId = id diff --git a/pkg/gtr/gtr.go b/pkg/gtr/gtr.go index 2c9ae60..19f75e4 100644 --- a/pkg/gtr/gtr.go +++ b/pkg/gtr/gtr.go @@ -76,6 +76,10 @@ func FromEvents(events []Event, packageName string) Report { switch ev.Type { case "run_test": report.CreateTest(ev.Name) + case "pause_test": + report.PauseTest(ev.Name) + case "cont_test": + report.ContinueTest(ev.Name) case "end_test": report.EndTest(ev.Name, ev.Result, ev.Duration) case "benchmark":