From a31ccef99b782ba23961b76592252f34b10e0cf0 Mon Sep 17 00:00:00 2001 From: Matthias Radestock Date: Mon, 12 Oct 2015 16:06:26 +0100 Subject: [PATCH] only produce coverage for packages under github.com/weaveworks/weave Fixes #1524. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 1e1957dc..a4efc0af 100644 --- a/Makefile +++ b/Makefile @@ -54,7 +54,7 @@ update: $(WEAVER_EXE) $(WEAVEPROXY_EXE): common/*.go common/*/*.go net/*.go ifeq ($(COVERAGE),true) - $(eval COVERAGE_MODULES := $(shell (go list ./$(@D); go list -f '{{join .Deps "\n"}}' ./$(@D) | grep "weaveworks") | paste -s -d,)) + $(eval COVERAGE_MODULES := $(shell (go list ./$(@D); go list -f '{{join .Deps "\n"}}' ./$(@D) | grep "^github.com/weaveworks/weave/") | paste -s -d,)) go get -t -tags netgo ./$(@D) go test -c -o ./$@ $(BUILD_FLAGS) -v -covermode=atomic -coverpkg $(COVERAGE_MODULES) ./$(@D)/ else