gtr: Add support for pause/continue tests

This commit is contained in:
Joël Stemmer
2019-10-07 00:24:01 +01:00
parent c845dfac27
commit f7ae0905a2
2 changed files with 12 additions and 0 deletions

View File

@ -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