Skip to content

Commit 1158520

Browse files
Bryan Millsgopherbot
Bryan Mills
authored andcommitted
Revert "cmd/go/internal/test: wrap os.Stdout always"
This reverts CL 400877. Reason for revert: broke TestScript/test_output_wait and the regression test for #18153 on certain builders. Fixes #52461. Change-Id: I98627ce5e22088b0784be502c459480c41ba353a Reviewed-on: https://go-review.googlesource.com/c/go/+/401494 Reviewed-by: Daniel Martí <[email protected]> Run-TryBot: Daniel Martí <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Auto-Submit: Bryan Mills <[email protected]> Reviewed-by: Michael Pratt <[email protected]>
1 parent b941a10 commit 1158520

File tree

2 files changed

+1
-40
lines changed

2 files changed

+1
-40
lines changed

src/cmd/go/internal/test/test.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1261,11 +1261,7 @@ func (c *runCache) builderRunTest(b *work.Builder, ctx context.Context, a *work.
12611261
return nil
12621262
}
12631263

1264-
// The os/exec package treats an *os.File differently to an io.Writer.
1265-
// Embed os.Stdout in an io.Writer struct so that we get the same
1266-
// behavior regardless of whether we wrap it below.
1267-
// See golang.org/issue/24050
1268-
var stdout io.Writer = struct{ io.Writer }{os.Stdout}
1264+
var stdout io.Writer = os.Stdout
12691265
var err error
12701266
if testJSON {
12711267
json := test2json.NewConverter(lockedStdout{}, a.Package.ImportPath, test2json.Timestamp)

src/cmd/go/testdata/script/test_output_wait.txt

Lines changed: 0 additions & 35 deletions
This file was deleted.

0 commit comments

Comments
 (0)