// startAlarm starts an alarm if requested. func startAlarm() { if *timeout > 0 { timer = time.AfterFunc(*timeout, func() { debug.SetTraceback("all") panic(fmt.Sprintf("test timed out after %v", *timeout)) }) } }
// LoudPanic panics in a way that gets all goroutine stacks printed on stderr. func LoudPanic(x interface{}) { debug.SetTraceback("all") panic(x) }