1 TEST?=$$(go list ./... |grep -v 'vendor')
2 GOFMT_FILES?=$$(find . -name '*.go' |grep -v vendor)
3 COVER_TEST?=$$(go list ./... |grep -v 'vendor')
11 go test -i $(TEST) || exit 1
13 xargs -t -n4 go test $(TESTARGS) -timeout=30s -parallel=4
16 TF_ACC=1 go test $(TEST) -v $(TESTARGS) -timeout 120m
19 TF_ACC= go test -race $(TEST) $(TESTARGS)
22 @go tool cover 2>/dev/null; if [ $$? -eq 3 ]; then \
23 go get -u golang.org/x/tools/cmd/cover; \
25 go test $(COVER_TEST) -coverprofile=coverage.out
26 go tool cover -html=coverage.out
31 @go vet $$(go list ./... | grep -v vendor/) ; if [ $$? -eq 1 ]; then \
33 echo "Vet found suspicious constructs. Please check the reported constructs"; \
34 echo "and fix them if necessary before submitting the code for review."; \
39 gofmt -w $(GOFMT_FILES)
42 @sh -c "'$(CURDIR)/scripts/gofmtcheck.sh'"
45 @sh -c "'$(CURDIR)/scripts/errcheck.sh'"
50 test-compile: fmtcheck
51 @if [ "$(TEST)" = "./..." ]; then \
52 echo "ERROR: Set TEST to a specific package. For example,"; \
53 echo " make test-compile TEST=./builtin/providers/aws"; \
56 go test -c $(TEST) $(TESTARGS)
58 .PHONY: build test testacc testrace cover vet fmt fmtcheck errcheck vendor-status test-compile