Skip to content

Commit ba669f0

Browse files
committed
ci: Add -coverpkg when generating coverage
Adds coverage accross package boundaries. Signed-off-by: Alf-Rune Siqveland <[email protected]>
1 parent 22386d1 commit ba669f0

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Makefile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ GO ?= go
22
GOFMT ?= gofmt
33
V ?=
44
PREFIX ?= /usr/local
5-
PKGS = $(shell go list ./... | grep -v vendor)
6-
SUBPKGS = $(shell go list ./... | sed '1d' | tr '\n' ',' | sed 's/,$$//1')
5+
PKGS = $(shell go list ./... | tr '\n' ',' | head -c -1)
76
PKGNAME = mender-artifact
87
PKGFILES = $(shell find . \( -path ./vendor -o -path ./Godeps \) -prune \
98
-o -type f -name '*.go' -print)
@@ -146,7 +145,7 @@ instrument-binary:
146145

147146
coverage:
148147
rm -f coverage.txt
149-
go test -tags '$(TAGS)' -covermode=atomic -coverprofile=coverage.txt ./...
148+
go test -tags '$(TAGS)' -covermode=atomic -coverpkg=$(PKGS) -coverprofile=coverage.txt ./...
150149

151150
.PHONY: build clean get-tools test check \
152151
cover htmlcover coverage tooldep install-autocomplete-scripts \

0 commit comments

Comments
 (0)