Renable code coverage collection in unit tests, including on Travis.
When code coverage is not being collected, just issue a single 'go test' command, as is already done. Go will internally parallize execution. When code coverage is being collected, it is necessary to issue separate 'go test' commands for each package, since Go does not support collecting coverage across packages. Using xargs -P will parallelize these invocations, however, speeding up test execution. The number of simultaneous processes to use can be specified with KUBE_COVERPROCS. Update Travis config to pass along the number of CPUs to use for running tests.
This commit is contained in:
@@ -20,4 +20,4 @@ set -o pipefail
|
||||
|
||||
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
|
||||
|
||||
KUBE_COVER=" " KUBE_RACE=" " "${KUBE_ROOT}/hack/test-go.sh" "" -test.run="^X" -benchtime=1s -bench=. -benchmem
|
||||
KUBE_COVER="" KUBE_RACE=" " "${KUBE_ROOT}/hack/test-go.sh" -- -test.run="^X" -benchtime=1s -bench=. -benchmem
|
||||
|
Reference in New Issue
Block a user