]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go: document that -p applies to test binary execution
authorRuss Cox <rsc@golang.org>
Thu, 17 Dec 2015 05:52:33 +0000 (00:52 -0500)
committerRuss Cox <rsc@golang.org>
Thu, 17 Dec 2015 16:59:30 +0000 (16:59 +0000)
Fixes #11521.

Change-Id: I73615b881df4a0d5e2f5bc5059359d150ca8c105
Reviewed-on: https://go-review.googlesource.com/17946
Reviewed-by: Joe Shaw <joe@joeshaw.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/cmd/go/alldocs.go
src/cmd/go/build.go
src/cmd/go/test.go

index 8053b862d1a21cf7b50a537b0b608941f5c0670b..4487b7442e318b01e7ceb92d6973dc096426e986 100644 (file)
@@ -84,7 +84,8 @@ and test commands:
        -n
                print the commands but do not run them.
        -p n
-               the number of builds that can be run in parallel.
+               the number of programs, such as build commands or
+               test binaries, that can be run in parallel.
                The default is the number of CPUs available, except
                on darwin/arm which defaults to 1.
        -race
@@ -1420,6 +1421,10 @@ control the execution of any test:
            Allow parallel execution of test functions that call t.Parallel.
            The value of this flag is the maximum number of tests to run
            simultaneously; by default, it is set to the value of GOMAXPROCS.
+           Note that -parallel only applies within a single test binary.
+           The 'go test' command may run tests for different packages
+           in parallel as well, according to the setting of the -p flag
+           (see 'go help build').
 
        -run regexp
            Run only those tests and examples matching the regular
index dc1e61284e19f70b1454e5c8c155503df3155fd0..82fd9833c00ea59389be87c11241d17ef1322c0b 100644 (file)
@@ -63,7 +63,8 @@ and test commands:
        -n
                print the commands but do not run them.
        -p n
-               the number of builds that can be run in parallel.
+               the number of programs, such as build commands or
+               test binaries, that can be run in parallel.
                The default is the number of CPUs available, except
                on darwin/arm which defaults to 1.
        -race
index acca304dfeb69a7759eb168d9aa8af55198e2439..2010329365f552e5f75434cf171ca446cf7fe1bc 100644 (file)
@@ -207,6 +207,10 @@ const testFlag2 = `
            Allow parallel execution of test functions that call t.Parallel.
            The value of this flag is the maximum number of tests to run
            simultaneously; by default, it is set to the value of GOMAXPROCS.
+           Note that -parallel only applies within a single test binary.
+           The 'go test' command may run tests for different packages
+           in parallel as well, according to the setting of the -p flag
+           (see 'go help build').
 
        -run regexp
            Run only those tests and examples matching the regular