We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1aa37c5 commit 838d914Copy full SHA for 838d914
1 file changed
internal/test/test.go
@@ -273,8 +273,12 @@ func testCode(
273
}
274
275
// Limit concurrency to flags.Jobs, defaulting to number of CPU cores.
276
+ // When coverage is enabled, force sequential execution because the
277
+ // coverage report is shared across all test file goroutines.
278
jobs := flags.Jobs
- if jobs <= 0 {
279
+ if flags.Cover {
280
+ jobs = 1
281
+ } else if jobs <= 0 {
282
jobs = goRuntime.NumCPU()
283
284
sem := make(chan struct{}, jobs)
0 commit comments