From cd5aeecb43a6fddddd757e8e72fe04dfeb82b34a Mon Sep 17 00:00:00 2001 From: Miek Gieben Date: Mon, 30 Sep 2019 09:01:19 +0100 Subject: [PATCH] Makefiles: remove GO111MODULE (#3326) * Makefiles: remove GO111MODULE This is the default in 1.13 it can be removed; also make the test out log less, so failure are more pronounced in the travis out, hide coverage stats for instance. Signed-off-by: Miek Gieben * Kill -v as wel Signed-off-by: Miek Gieben --- Makefile | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/Makefile b/Makefile index 648b8f38b..e82ffc7e9 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,7 @@ all: coredns .PHONY: coredns coredns: $(CHECKS) - GO111MODULE=on CGO_ENABLED=$(CGO_ENABLED) $(SYSTEM) go build $(BUILDOPTS) -ldflags="-s -w -X github.com/coredns/coredns/coremain.GitCommit=$(GITCOMMIT)" -o $(BINARY) + CGO_ENABLED=$(CGO_ENABLED) $(SYSTEM) go build $(BUILDOPTS) -ldflags="-s -w -X github.com/coredns/coredns/coremain.GitCommit=$(GITCOMMIT)" -o $(BINARY) .PHONY: check check: presubmit core/plugin/zplugin.go core/dnsserver/zdirectives.go @@ -22,25 +22,23 @@ check: presubmit core/plugin/zplugin.go core/dnsserver/zdirectives.go .PHONY: travis travis: ifeq ($(TEST_TYPE),core) - ( cd request ; GO111MODULE=on go test -v -race ./... ) - ( cd core ; GO111MODULE=on go test -v -race ./... ) - ( cd coremain ; GO111MODULE=on go test -v -race ./... ) + ( cd request; go test -race ./... ) + ( cd core; go test -race ./... ) + ( cd coremain; go test -race ./... ) endif ifeq ($(TEST_TYPE),integration) - ( cd test ; GO111MODULE=on go test -v -race ./... ) + ( cd test; go test -race ./... ) endif ifeq ($(TEST_TYPE),plugin) - ( cd plugin ; GO111MODULE=on go test -v -race ./... ) + ( cd plugin; go test -race ./... ) endif ifeq ($(TEST_TYPE),coverage) for d in `go list ./... | grep -v vendor`; do \ t=$$(date +%s); \ - GO111MODULE=on go test -i -coverprofile=cover.out -covermode=atomic $$d || exit 1; \ - GO111MODULE=on go test -v -coverprofile=cover.out -covermode=atomic $$d || exit 1; \ - echo "Coverage test $$d took $$(($$(date +%s)-t)) seconds"; \ + go test -i -coverprofile=cover.out -covermode=atomic $$d || exit 1; \ + go test -coverprofile=cover.out -covermode=atomic $$d || exit 1; \ if [ -f cover.out ]; then \ - cat cover.out >> coverage.txt; \ - rm cover.out; \ + cat cover.out >> coverage.txt && rm cover.out; \ fi; \ done endif @@ -61,11 +59,11 @@ ifeq ($(TEST_TYPE),fuzzit) endif core/plugin/zplugin.go core/dnsserver/zdirectives.go: plugin.cfg - GO111MODULE=on go generate coredns.go + go generate coredns.go .PHONY: gen gen: - GO111MODULE=on go generate coredns.go + go generate coredns.go .PHONY: pb pb: @@ -78,5 +76,5 @@ presubmit: .PHONY: clean clean: - GO111MODULE=on go clean + go clean rm -f coredns