1
0
mirror of https://github.com/golang/go synced 2024-11-11 19:21:37 -07:00

test/run: limit parallelism to 1 for cross-exec builds

This matters for NaCl, which seems to swamp my 4-core MacBook Pro otherwise.
It's not a correctness problem, just a usability problem.

LGTM=bradfitz
R=bradfitz
CC=golang-codereviews
https://golang.org/cl/98600046
This commit is contained in:
Russ Cox 2014-05-28 01:01:08 -04:00
parent d432238fad
commit 4895f0dc5e

View File

@ -71,15 +71,15 @@ const maxTests = 5000
func main() {
flag.Parse()
// Disable parallelism if printing
if *verbose {
*numParallel = 1
}
goos = os.Getenv("GOOS")
goarch = os.Getenv("GOARCH")
findExecCmd()
// Disable parallelism if printing or if using a simulator.
if *verbose || len(findExecCmd()) > 0 {
*numParallel = 1
}
ratec = make(chan bool, *numParallel)
rungatec = make(chan bool, *runoutputLimit)
var err error