@@ -1337,13 +1337,13 @@ func (c *runCache) builderRunTest(b *work.Builder, ctx context.Context, a *work.
1337
1337
}
1338
1338
args := str .StringList (execCmd , a .Deps [0 ].BuiltTarget (), testlogArg , panicArg , fuzzArg , testArgs )
1339
1339
1340
- var coverprofileFile string
1340
+ var tempCoverProfile string
1341
1341
if testCoverProfile != "" {
1342
1342
// Write coverage to temporary profile, for merging later.
1343
- coverprofileFile = a .Objdir + "_cover_.out"
1343
+ tempCoverProfile = a .Objdir + "_cover_.out"
1344
1344
for i , arg := range args {
1345
1345
if strings .HasPrefix (arg , "-test.coverprofile=" ) {
1346
- args [i ] = "-test.coverprofile=" + coverprofileFile
1346
+ args [i ] = "-test.coverprofile=" + tempCoverProfile
1347
1347
}
1348
1348
}
1349
1349
}
@@ -1425,7 +1425,7 @@ func (c *runCache) builderRunTest(b *work.Builder, ctx context.Context, a *work.
1425
1425
a .TestOutput = & buf
1426
1426
t := fmt .Sprintf ("%.3fs" , time .Since (t0 ).Seconds ())
1427
1427
1428
- if coverErr := mergeCoverProfile (coverprofileFile ); coverErr != nil {
1428
+ if coverErr := mergeCoverProfile (tempCoverProfile ); coverErr != nil {
1429
1429
fmt .Fprintf (cmd .Stdout , "error: %v\n " , coverErr )
1430
1430
}
1431
1431
@@ -1449,7 +1449,7 @@ func (c *runCache) builderRunTest(b *work.Builder, ctx context.Context, a *work.
1449
1449
cmd .Stdout .Write ([]byte ("\n " ))
1450
1450
}
1451
1451
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 )
1453
1453
} else {
1454
1454
base .SetExitStatus (1 )
1455
1455
if len (out ) == 0 {
0 commit comments