()
| 500 | } |
| 501 | |
| 502 | func getTestName() string { |
| 503 | callers := make([]uintptr, 100) |
| 504 | runtime.Callers(1, callers) |
| 505 | for i, caller := range callers { |
| 506 | f := runtime.FuncForPC(caller) |
| 507 | if f != nil { |
| 508 | if f.Name() == "testing.tRunner" { |
| 509 | testf := runtime.FuncForPC(callers[i-1]) |
| 510 | if testf != nil { |
| 511 | path := strings.Split(testf.Name(), ".") |
| 512 | return path[len(path)-1] |
| 513 | } |
| 514 | } |
| 515 | } |
| 516 | } |
| 517 | return time.Now().String() |
| 518 | } |
| 519 | |
| 520 | func checkedStop(t *testing.T, p *rc.Process) { |
| 521 | if _, err := p.Stop(); err != nil { |
no test coverage detected