aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/runtime_test.go
diff options
context:
space:
mode:
authorAustin Clements <austin@google.com>2016-01-14 16:43:40 -0500
committerAustin Clements <austin@google.com>2016-01-15 02:22:46 +0000
commit1556c317f1eb3df4f41e9a69cb4192dc27d09d82 (patch)
tree7ea96caf5d7be631118116398a48f5f434aef8e0 /src/runtime/runtime_test.go
parentc5a2f364d3c0ba355f6a1a63e9f4bee96a48e332 (diff)
downloadgo-1556c317f1eb3df4f41e9a69cb4192dc27d09d82.tar.gz
go-1556c317f1eb3df4f41e9a69cb4192dc27d09d82.zip
runtime: use at least "system" traceback level for runtime tests
While the default behavior of eliding runtime frames from tracebacks usually makes sense, this is not the case when you're trying to test the runtime itself. Fix this by forcing the traceback level to at least "system" in the runtime tests. This will specifically help with debugging issue #13645, which has proven remarkably resistant to reproduction outside of the build dashboard itself. Change-Id: I2a8356ba6c3c5badba8bb3330fc527357ec0d296 Reviewed-on: https://go-review.googlesource.com/18648 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
Diffstat (limited to 'src/runtime/runtime_test.go')
-rw-r--r--src/runtime/runtime_test.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/runtime/runtime_test.go b/src/runtime/runtime_test.go
index 75fc9bcb84..664c1180c4 100644
--- a/src/runtime/runtime_test.go
+++ b/src/runtime/runtime_test.go
@@ -12,6 +12,13 @@ import (
"unsafe"
)
+func init() {
+ // We're testing the runtime, so make tracebacks show things
+ // in the runtime. This only raises the level, so it won't
+ // override GOTRACEBACK=crash from the user.
+ SetTracebackEnv("system")
+}
+
var errf error
func errfn() error {