diff options
author | 2016-09-26 14:22:48 +0800 | |
---|---|---|
committer | 2016-09-26 07:22:48 +0100 | |
commit | 6a7db541fa6fcd742d0e00cf47182adcdc6957e2 (patch) | |
tree | 21fb72db6bb20ee5eecdb548b68b1384ce50afa5 /Makefile | |
parent | ed1a4eed2e7f560d801546917131ae0d6031fd70 (diff) | |
download | coredns-6a7db541fa6fcd742d0e00cf47182adcdc6957e2.tar.gz coredns-6a7db541fa6fcd742d0e00cf47182adcdc6957e2.tar.zst coredns-6a7db541fa6fcd742d0e00cf47182adcdc6957e2.zip |
Move `.coverage.sh` to `make coverage` (#301)
This fix moves the content of `.coverage.sh` to the Makefile
and creates a target of `make coverage`. This cleans up as
there is really no need to have a redundant script for
simple coverage test.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -38,6 +38,18 @@ testk8s: deps testk8s-setup: deps go test -v ./middleware/kubernetes/... -run TestKubernetes +.PHONY: coverage +coverage: deps + set -e -x + echo "" > coverage.txt + for d in `go list ./... | grep -v vendor`; do \ + go test -race -coverprofile=profile.out -covermode=atomic $$d; \ + if [ -f profile.out ]; then \ + cat profile.out >> coverage.txt; \ + rm profile.out; \ + fi; \ + done + .PHONY: clean clean: go clean |