Commit 8bcfad26 authored by Russ Cox's avatar Russ Cox

testing: use runtime/debug to format panics

Sorry, Mercurial failed me.

TBR=r, dsymonds
CC=golang-dev
https://golang.org/cl/5649080
parent f735d2d9
......@@ -248,12 +248,10 @@ func tRunner(t *T, test *InternalTest) {
// a call to runtime.Goexit, record the duration and send
// a signal saying that the test is done.
defer func() {
if false {
// Log and recover from panic instead of aborting binary.
if err := recover(); err != nil {
t.failed = true
t.Logf("%s\n%s", err, debug.Stack())
}
// Log and recover from panic instead of aborting binary.
if err := recover(); err != nil {
t.failed = true
t.Logf("%s\n%s", err, debug.Stack())
}
t.duration = time.Now().Sub(t.start)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment