Skip to content

Commit de26ed4

Browse files
committed
Rename var for clarity
1 parent d1577ae commit de26ed4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1337,13 +1337,13 @@ func (c *runCache) builderRunTest(b *work.Builder, ctx context.Context, a *work.
13371337
}
13381338
args := str.StringList(execCmd, a.Deps[0].BuiltTarget(), testlogArg, panicArg, fuzzArg, testArgs)
13391339

1340-
var coverprofileFile string
1340+
var tempCoverProfile string
13411341
if testCoverProfile != "" {
13421342
// Write coverage to temporary profile, for merging later.
1343-
coverprofileFile = a.Objdir + "_cover_.out"
1343+
tempCoverProfile = a.Objdir + "_cover_.out"
13441344
for i, arg := range args {
13451345
if strings.HasPrefix(arg, "-test.coverprofile=") {
1346-
args[i] = "-test.coverprofile=" + coverprofileFile
1346+
args[i] = "-test.coverprofile=" + tempCoverProfile
13471347
}
13481348
}
13491349
}
@@ -1425,7 +1425,7 @@ func (c *runCache) builderRunTest(b *work.Builder, ctx context.Context, a *work.
14251425
a.TestOutput = &buf
14261426
t := fmt.Sprintf("%.3fs", time.Since(t0).Seconds())
14271427

1428-
if coverErr := mergeCoverProfile(coverprofileFile); coverErr != nil {
1428+
if coverErr := mergeCoverProfile(tempCoverProfile); coverErr != nil {
14291429
fmt.Fprintf(cmd.Stdout, "error: %v\n", coverErr)
14301430
}
14311431

@@ -1449,7 +1449,7 @@ func (c *runCache) builderRunTest(b *work.Builder, ctx context.Context, a *work.
14491449
cmd.Stdout.Write([]byte("\n"))
14501450
}
14511451
fmt.Fprintf(cmd.Stdout, "ok \t%s\t%s%s%s\n", a.Package.ImportPath, t, coveragePercentage(out), norun)
1452-
c.saveOutput(a, coverprofileFile)
1452+
c.saveOutput(a, tempCoverProfile)
14531453
} else {
14541454
base.SetExitStatus(1)
14551455
if len(out) == 0 {

0 commit comments

Comments
 (0)