Update Makefile test handling.

This commit is contained in:
Will Rouesnel 2017-06-06 23:45:48 +10:00
parent 34ffcb449d
commit 8a1a12fd05
2 changed files with 3 additions and 3 deletions

2
.gitignore vendored
View File

@ -10,4 +10,4 @@ cover.out
cover.*.out cover.*.out
.coverage .coverage
*.prom *.prom
.metrics.*.*.prom

View File

@ -43,10 +43,10 @@ fmt: tools
gofmt -s -w $(GO_SRC) gofmt -s -w $(GO_SRC)
test: tools test: tools
@rm -rf $(COVERDIR)
@mkdir -p $(COVERDIR) @mkdir -p $(COVERDIR)
@rm -f $(COVERDIR)/*
for pkg in $(GO_PKGS) ; do \ for pkg in $(GO_PKGS) ; do \
go test -v -covermode count -coverprofile=$(COVERDIR)/$(echo $$pkg | tr '/' '-').out $(pkg) ; \ go test -v -covermode count -coverprofile=$(COVERDIR)/$$(echo $$pkg | tr '/' '-').out $$pkg ; \
done done
gocovmerge $(shell find $(COVERDIR) -name '*.out') > cover.out gocovmerge $(shell find $(COVERDIR) -name '*.out') > cover.out