aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/runtime-gdb_test.go
diff options
context:
space:
mode:
authorEgon Elbre <egonelbre@gmail.com>2018-03-24 18:07:58 +0200
committerAlex Brainman <alex.brainman@gmail.com>2018-04-07 08:29:15 +0000
commitcd682f3832629e600e497c4a9b37209f4aeed5dc (patch)
tree7f79794808b7298624bf4468ac8c1a3838c5059b /src/runtime/runtime-gdb_test.go
parent31db81d329ddeacc4ba18671783cca5f1ddb4b9d (diff)
downloadgo-cd682f3832629e600e497c4a9b37209f4aeed5dc.tar.gz
go-cd682f3832629e600e497c4a9b37209f4aeed5dc.zip
runtime: improve Windows gdb tests
This ensures that gdb tests run on Windows by ignoring any line ending. Works with gdb 7.7, however with gdb 7.9 and 7.12 gets an error error: internal-error: buildsym_init: Assertion `free_pendings == NULL' failed. Updates #21380 Change-Id: I6a6e5b2a1b5efdca4dfce009fcb9c134c87497d6 Reviewed-on: https://go-review.googlesource.com/102419 TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
Diffstat (limited to 'src/runtime/runtime-gdb_test.go')
-rw-r--r--src/runtime/runtime-gdb_test.go9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/runtime/runtime-gdb_test.go b/src/runtime/runtime-gdb_test.go
index 090e1c61d0..cae12e8af2 100644
--- a/src/runtime/runtime-gdb_test.go
+++ b/src/runtime/runtime-gdb_test.go
@@ -70,7 +70,7 @@ func checkGdbPython(t *testing.T) {
if err != nil {
t.Skipf("skipping due to issue running gdb: %v", err)
}
- if string(out) != "go gdb python support\n" {
+ if strings.TrimSpace(string(out)) != "go gdb python support" {
t.Skipf("skipping due to lack of python gdb support: %s", out)
}
}
@@ -154,8 +154,8 @@ func testGdbPython(t *testing.T, cgo bool) {
t.Fatalf("building source %v\n%s", err, out)
}
- args := []string{"-nx", "-q", "--batch", "-iex",
- fmt.Sprintf("add-auto-load-safe-path %s/src/runtime", runtime.GOROOT()),
+ args := []string{"-nx", "-q", "--batch",
+ "-iex", "add-auto-load-safe-path " + filepath.Join(runtime.GOROOT(), "src", "runtime"),
"-ex", "set startup-with-shell off",
"-ex", "info auto-load python-scripts",
"-ex", "set python print-stack full",
@@ -320,6 +320,7 @@ func TestGdbBacktrace(t *testing.T) {
// Execute gdb commands.
args := []string{"-nx", "-batch",
+ "-iex", "add-auto-load-safe-path " + filepath.Join(runtime.GOROOT(), "src", "runtime"),
"-ex", "set startup-with-shell off",
"-ex", "break main.eee",
"-ex", "run",
@@ -390,6 +391,7 @@ func TestGdbAutotmpTypes(t *testing.T) {
// Execute gdb commands.
args := []string{"-nx", "-batch",
+ "-iex", "add-auto-load-safe-path " + filepath.Join(runtime.GOROOT(), "src", "runtime"),
"-ex", "set startup-with-shell off",
"-ex", "break main.main",
"-ex", "run",
@@ -455,6 +457,7 @@ func TestGdbConst(t *testing.T) {
// Execute gdb commands.
args := []string{"-nx", "-batch",
+ "-iex", "add-auto-load-safe-path " + filepath.Join(runtime.GOROOT(), "src", "runtime"),
"-ex", "set startup-with-shell off",
"-ex", "break main.main",
"-ex", "run",