From 82da45a6380ce70f7f8301e4fae78eb4b77b9f0d Mon Sep 17 00:00:00 2001 From: Matthias Radestock Date: Thu, 25 Jun 2015 19:31:38 +0100 Subject: [PATCH] `go get` test dependencies The previous 'fix' wasn't working since it `go get -t`'ed the dirs where our executables live. Which don't contain any tests. --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 91cdbeb198..0e4efa866a 100644 --- a/Makefile +++ b/Makefile @@ -44,7 +44,7 @@ update: $(EXES) go get -u -f -v -tags -netgo $(addprefix ./,$(dir $(EXES))) $(WEAVER_EXE) $(WEAVEDNS_EXE) $(WEAVEPROXY_EXE) $(NETCHECK_EXE): common/*.go common/*/*.go net/*.go - go get -t -tags netgo ./$(@D) + go get -tags netgo ./$(@D) go build -ldflags "-extldflags \"-static\" -X main.version $(WEAVE_VERSION)" -tags netgo -o $@ ./$(@D) @strings $@ | grep cgo_stub\\\.go >/dev/null || { \ rm $@; \ @@ -96,6 +96,7 @@ tests: echo "mode: count" > profile.cov fail=0 ; \ for dir in $$(find . -type f -name '*_test.go' | xargs -n1 dirname | sort -u); do \ + go get -t -tags netgo $$dir ; \ output=$$(mktemp cover.XXXXXXXXXX) ; \ if ! go test -cpu 4 -tags netgo -covermode=count -coverprofile=$$output $$dir ; then \ fail=1 ; \