mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
runtime: normalize line endings in TestGdbPython
TestGdbPython fails on some Windows setups because the line endings in the output of the gdb command can potentially be CRLF, but the test expects LF. This CL changes the test to normalize the line endings. Change-Id: Iada9c37dc98249ac3c5f1edca4a657c51d4382a2 Reviewed-on: https://go-review.googlesource.com/c/go/+/532816 Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Michael Pratt <mpratt@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Quim Muntal <quimmuntal@gmail.com> Auto-Submit: Quim Muntal <quimmuntal@gmail.com>
This commit is contained in:
parent
262b8050da
commit
5da31049a6
1 changed files with 1 additions and 0 deletions
|
|
@ -275,6 +275,7 @@ func testGdbPython(t *testing.T, cgo bool) {
|
|||
t.Fatalf("gdb exited with error: %v", err)
|
||||
}
|
||||
|
||||
got = bytes.ReplaceAll(got, []byte("\r\n"), []byte("\n")) // normalize line endings
|
||||
firstLine, _, _ := bytes.Cut(got, []byte("\n"))
|
||||
if string(firstLine) != "Loading Go Runtime support." {
|
||||
// This can happen when using all.bash with
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue