aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2014-05-28 01:01:08 -0400
committerRuss Cox <rsc@golang.org>2014-05-28 01:01:08 -0400
commit4895f0dc5edb8c7f8721f9e9eec15524a283cf4a (patch)
tree3db84627d4e3a36b3433a77fd206d066716321b5
parentd432238fadd10fa514a04975dfe85719b5b8f377 (diff)
downloadgo-4895f0dc5edb8c7f8721f9e9eec15524a283cf4a.tar.gz
go-4895f0dc5edb8c7f8721f9e9eec15524a283cf4a.zip
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
-rw-r--r--test/run.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/run.go b/test/run.go
index c96e37dba0..a8d4baa3ac 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