-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cherry-pick CL 532816 "runtime: normalize line endings in TestGdbPython"
- Loading branch information
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
patches/0009-runtime-normalize-line-endings-in-TestGdbPython.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: qmuntal <[email protected]> | ||
Date: Thu, 5 Oct 2023 12:02:43 +0200 | ||
Subject: [PATCH] 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 | ||
--- | ||
src/runtime/runtime-gdb_test.go | 1 + | ||
1 file changed, 1 insertion(+) | ||
|
||
diff --git a/src/runtime/runtime-gdb_test.go b/src/runtime/runtime-gdb_test.go | ||
index 8c759bf4066370..ced71ca4767d0f 100644 | ||
--- a/src/runtime/runtime-gdb_test.go | ||
+++ b/src/runtime/runtime-gdb_test.go | ||
@@ -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 |