Skip to content

Commit 74b0e24

Browse files
committed
Rename var for clarity
1 parent b739f25 commit 74b0e24

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
}
@@ -1420,7 +1420,7 @@ func (c *runCache) builderRunTest(b *work.Builder, ctx context.Context, a *work.
14201420
a.TestOutput = &buf
14211421
t := fmt.Sprintf("%.3fs", time.Since(t0).Seconds())
14221422

1423-
if coverErr := mergeCoverProfile(coverprofileFile); coverErr != nil {
1423+
if coverErr := mergeCoverProfile(tempCoverProfile); coverErr != nil {
14241424
fmt.Fprintf(cmd.Stdout, "error: %v\n", coverErr)
14251425
}
14261426

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

0 commit comments

Comments
 (0)