diff options
author | Russ Cox <rsc@golang.org> | 2014-05-28 01:01:08 -0400 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2014-05-28 01:01:08 -0400 |
commit | 01c3d24bc4703891802bfd0145e6b7000fa6514d (patch) | |
tree | f0d7dfc203c867523589809be9b45648dac722a4 | |
parent | 6be9b23c26b00cd4fa5c3003a739c28b82f1f0c8 (diff) | |
download | go-01c3d24bc4703891802bfd0145e6b7000fa6514d.tar.gz |
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://codereview.appspot.com/98600046
-rw-r--r-- | test/run.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/run.go b/test/run.go index c96e37dba..a8d4baa3a 100644 --- a/test/run.go +++ b/test/run.go @@ -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 |