mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-09 21:21:14 +00:00
Produce a combined coverage report when running Go unit tests.
The Go coverage tool does not currently support recording a coverage data profile across packages, so we must manually combine these coverage profiles and use it to produce an HTML report when KUBE_COVER is nonempty. The exact value of KUBE_COVER is now ignored; KUBE_COVERMODE can be used to set the coverage mode from the default of "atomic". Additionally, if KUBE_GOVERALLS_BIN is set, hack/test-go.sh will attempt to report coverage results to Coveralls.io. This is intended to be used with the Travis build.
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