Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion internal/test/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -273,8 +273,12 @@ func testCode(
}

// Limit concurrency to flags.Jobs, defaulting to number of CPU cores.
// When coverage is enabled, force sequential execution because the
// coverage report is shared across all test file goroutines.
jobs := flags.Jobs
if jobs <= 0 {
if flags.Cover {
Comment thread
turbolent marked this conversation as resolved.
jobs = 1
} else if jobs <= 0 {
jobs = goRuntime.NumCPU()
}
sem := make(chan struct{}, jobs)
Expand Down
Loading