Fixes #13681.
Change-Id: I308930f4d9200fbe0f09cd08c38392ca1bb0db67
Reviewed-on: https://go-review.googlesource.com/18044
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
"runtime/trace": {"L0"},
"text/tabwriter": {"L2"},
- "testing": {"L2", "flag", "fmt", "os", "runtime/pprof", "runtime/trace", "time"},
+ "testing": {"L2", "flag", "fmt", "os", "runtime/debug", "runtime/pprof", "runtime/trace", "time"},
"testing/iotest": {"L2", "log"},
"testing/quick": {"L2", "flag", "fmt", "reflect"},
"internal/testenv": {"L2", "os", "testing"},
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-package debug
+package debug_test
import (
"runtime"
+ . "runtime/debug"
"testing"
"time"
)
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-package debug
+package debug_test
import (
"io/ioutil"
"os"
"runtime"
+ . "runtime/debug"
"testing"
)
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-package debug
+package debug_test
import (
+ . "runtime/debug"
"strings"
"testing"
)
}
n++
frame("src/runtime/debug/stack.go", "runtime/debug.Stack")
- frame("src/runtime/debug/stack_test.go", "runtime/debug.(*T).ptrmethod")
- frame("src/runtime/debug/stack_test.go", "runtime/debug.T.method")
- frame("src/runtime/debug/stack_test.go", "runtime/debug.TestStack")
+ frame("src/runtime/debug/stack_test.go", "runtime/debug_test.(*T).ptrmethod")
+ frame("src/runtime/debug/stack_test.go", "runtime/debug_test.T.method")
+ frame("src/runtime/debug/stack_test.go", "runtime/debug_test.TestStack")
frame("src/testing/testing.go", "")
}
"fmt"
"os"
"runtime"
+ "runtime/debug"
"runtime/pprof"
"runtime/trace"
"strconv"
func startAlarm() {
if *timeout > 0 {
timer = time.AfterFunc(*timeout, func() {
+ debug.SetTraceback("all")
panic(fmt.Sprintf("test timed out after %v", *timeout))
})
}