Skip to content

Commit 1206e97

Browse files
cmd/go: don't use a testlog if there is an exec command
An exec command is normally used on platforms were the test is run in some unusual way, making it less likely that the testlog will be useful. Updates #22593 Change-Id: I0768f6da89cb559d8d675fdf6d685db9ecedab9e Reviewed-on: https://go-review.googlesource.com/83578 Run-TryBot: Ian Lance Taylor <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Brad Fitzpatrick <[email protected]>
1 parent 132b528 commit 1206e97

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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

+3-2
Original file line numberDiff line numberDiff line change
@@ -1265,11 +1265,12 @@ func (c *runCache) builderRunTest(b *work.Builder, a *work.Action) error {
12651265
return nil
12661266
}
12671267

1268+
execCmd := work.FindExecCmd()
12681269
testlogArg := []string{}
1269-
if !c.disableCache && cfg.Goos != "nacl" {
1270+
if !c.disableCache && len(execCmd) == 0 {
12701271
testlogArg = []string{"-test.testlogfile=" + a.Objdir + "testlog.txt"}
12711272
}
1272-
args := str.StringList(work.FindExecCmd(), a.Deps[0].Target, testlogArg, testArgs)
1273+
args := str.StringList(execCmd, a.Deps[0].Target, testlogArg, testArgs)
12731274

12741275
if testCoverProfile != "" {
12751276
// Write coverage to temporary profile, for merging later.

0 commit comments

Comments
 (0)