chore(coverage): update coverage command. (#354)
* chore(coverage): update coverage command. * update Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
15
Makefile
15
Makefile
@@ -112,8 +112,19 @@ misspell-check: $(MISSPELL)
|
||||
misspell: $(MISSPELL)
|
||||
$(MISSPELL) -w $(GOFILES)
|
||||
|
||||
test: fmt-check
|
||||
for PKG in $(PACKAGES); do $(GO) test -v -cover -coverprofile $$GOPATH/src/$$PKG/coverage.txt $$PKG || exit 1; done;
|
||||
.PHONY: coverage
|
||||
coverage:
|
||||
@hash gocovmerge > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
|
||||
$(GO) get -u github.com/wadey/gocovmerge; \
|
||||
fi
|
||||
gocovmerge $(shell find . -type f -name "coverage.out") > coverage.all;\
|
||||
|
||||
.PHONY: unit-test-coverage
|
||||
unit-test-coverage: init
|
||||
for PKG in $(PACKAGES); do $(GO) test -cover -coverprofile $$GOPATH/src/$$PKG/coverage.out $$PKG || exit 1; done;
|
||||
|
||||
test: init
|
||||
for PKG in $(PACKAGES); do $(GO) test -v $$PKG || exit 1; done;
|
||||
|
||||
.PHONY: test-vendor
|
||||
test-vendor: $(GOVENDOR)
|
||||
|
||||
Reference in New Issue
Block a user