diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-07-22 07:13:59 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-22 07:13:59 -0400 |
commit | 60c1d91657b640d2e0ebffb5a43a43e3fb9378b8 (patch) | |
tree | 5c106f229c0e4c7e1762c3372560fecefd8146a1 /Makefile | |
parent | 59bad8bf7176398dbab6b59867b17567691ffda3 (diff) | |
parent | a05c15da2f0b291ac1c40fac5bbf6e52cd659b6f (diff) | |
download | podman-60c1d91657b640d2e0ebffb5a43a43e3fb9378b8.tar.gz podman-60c1d91657b640d2e0ebffb5a43a43e3fb9378b8.tar.bz2 podman-60c1d91657b640d2e0ebffb5a43a43e3fb9378b8.zip |
Merge pull request #7032 from vrothberg/coverage
make localunit: record coverage
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -2,6 +2,7 @@ export GO111MODULE=off export GOPROXY=https://proxy.golang.org GO ?= go +COVERAGE_PATH ?= .coverage DESTDIR ?= EPOCH_TEST_COMMIT ?= $(shell git merge-base $${DEST_BRANCH:-master} HEAD) HEAD ?= HEAD @@ -308,14 +309,20 @@ testunit: libpodimage ## Run unittest on the built image .PHONY: localunit localunit: test/goecho/goecho varlink_generate hack/check_root.sh make localunit + rm -rf ${COVERAGE_PATH} && mkdir -p ${COVERAGE_PATH} ginkgo \ -r \ $(TESTFLAGS) \ --skipPackage test/e2e,pkg/apparmor,test/endpoint,pkg/bindings,hack \ --cover \ --covermode atomic \ + --coverprofile coverprofile \ + --outputdir ${COVERAGE_PATH} \ --tags "$(BUILDTAGS)" \ --succinct + $(GO) tool cover -html=${COVERAGE_PATH}/coverprofile -o ${COVERAGE_PATH}/coverage.html + $(GO) tool cover -func=${COVERAGE_PATH}/coverprofile > ${COVERAGE_PATH}/functions + cat ${COVERAGE_PATH}/functions | sed -n 's/\(total:\).*\([0-9][0-9].[0-9]\)/\1 \2/p' .PHONY: ginkgo ginkgo: |