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 <miek@miek.nl>

* Kill -v as wel

Signed-off-by: Miek Gieben <miek@miek.nl>
This commit is contained in:
Miek Gieben 2019-09-30 09:01:19 +01:00 committed by GitHub
parent 03a3695ea9
commit cd5aeecb43
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -14,7 +14,7 @@ all: coredns
.PHONY: coredns .PHONY: coredns
coredns: $(CHECKS) 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 .PHONY: check
check: presubmit core/plugin/zplugin.go core/dnsserver/zdirectives.go 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 .PHONY: travis
travis: travis:
ifeq ($(TEST_TYPE),core) ifeq ($(TEST_TYPE),core)
( cd request ; GO111MODULE=on go test -v -race ./... ) ( cd request; go test -race ./... )
( cd core ; GO111MODULE=on go test -v -race ./... ) ( cd core; go test -race ./... )
( cd coremain ; GO111MODULE=on go test -v -race ./... ) ( cd coremain; go test -race ./... )
endif endif
ifeq ($(TEST_TYPE),integration) ifeq ($(TEST_TYPE),integration)
( cd test ; GO111MODULE=on go test -v -race ./... ) ( cd test; go test -race ./... )
endif endif
ifeq ($(TEST_TYPE),plugin) ifeq ($(TEST_TYPE),plugin)
( cd plugin ; GO111MODULE=on go test -v -race ./... ) ( cd plugin; go test -race ./... )
endif endif
ifeq ($(TEST_TYPE),coverage) ifeq ($(TEST_TYPE),coverage)
for d in `go list ./... | grep -v vendor`; do \ for d in `go list ./... | grep -v vendor`; do \
t=$$(date +%s); \ t=$$(date +%s); \
GO111MODULE=on go test -i -coverprofile=cover.out -covermode=atomic $$d || exit 1; \ go test -i -coverprofile=cover.out -covermode=atomic $$d || exit 1; \
GO111MODULE=on go test -v -coverprofile=cover.out -covermode=atomic $$d || exit 1; \ go test -coverprofile=cover.out -covermode=atomic $$d || exit 1; \
echo "Coverage test $$d took $$(($$(date +%s)-t)) seconds"; \
if [ -f cover.out ]; then \ if [ -f cover.out ]; then \
cat cover.out >> coverage.txt; \ cat cover.out >> coverage.txt && rm cover.out; \
rm cover.out; \
fi; \ fi; \
done done
endif endif
@ -61,11 +59,11 @@ ifeq ($(TEST_TYPE),fuzzit)
endif endif
core/plugin/zplugin.go core/dnsserver/zdirectives.go: plugin.cfg core/plugin/zplugin.go core/dnsserver/zdirectives.go: plugin.cfg
GO111MODULE=on go generate coredns.go go generate coredns.go
.PHONY: gen .PHONY: gen
gen: gen:
GO111MODULE=on go generate coredns.go go generate coredns.go
.PHONY: pb .PHONY: pb
pb: pb:
@ -78,5 +76,5 @@ presubmit:
.PHONY: clean .PHONY: clean
clean: clean:
GO111MODULE=on go clean go clean
rm -f coredns rm -f coredns