aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile16
1 files changed, 14 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index fa49b20..c6b78c5 100644
--- a/Makefile
+++ b/Makefile
@@ -23,11 +23,23 @@ static-tests: FORCE
@echo '>> govet...'
@go vet ./...
-cover.out: FORCE
+PKG = github.com/majewsky/schwift
+TESTPKGS = $(PKG) $(PKG)/tests # space-separated list of packages containing tests
+COVERPKGS = $(PKG),$(PKG)/gopherschwift # comma-separated list of packages for which to measure coverage
+
+cover.out.%: FORCE
@echo '>> go test...'
- @go test -covermode count -coverpkg github.com/majewsky/schwift/... -coverprofile $@ github.com/majewsky/schwift/tests
+ go test -covermode count -coverpkg $(COVERPKGS) -coverprofile $@ $(subst _,/,$*)
+cover.out: $(addprefix cover.out.,$(subst /,_,$(TESTPKGS)))
+ util/gocovcat.go $^ > $@
cover.html: cover.out
@echo '>> rendering cover.html...'
@go tool cover -html=$< -o $@
+################################################################################
+
+# vendoring by https://github.com/holocm/golangvend
+vendor: FORCE
+ @golangvend
+
.PHONY: FORCE