1 TEST?=$$(go list ./... |grep -v 'vendor')
2 GOFMT_FILES?=$$(find . -name '*.go' |grep -v vendor)
3 WEBSITE_REPO=github.com/hashicorp/terraform-website
12 go test -i $(TEST) || exit 1
14 xargs -t -n4 go test $(TESTARGS) -timeout=30s -parallel=4
17 TF_ACC=1 go test $(TEST) -v $(TESTARGS) -timeout 120m
21 @go vet $$(go list ./... | grep -v vendor/) ; if [ $$? -eq 1 ]; then \
23 echo "Vet found suspicious constructs. Please check the reported constructs"; \
24 echo "and fix them if necessary before submitting the code for review."; \
29 gofmt -w $(GOFMT_FILES)
32 @sh -c "'$(CURDIR)/scripts/gofmtcheck.sh'"
35 @sh -c "'$(CURDIR)/scripts/errcheck.sh'"
41 @if [ "$(TEST)" = "./..." ]; then \
42 echo "ERROR: Set TEST to a specific package. For example,"; \
43 echo " make test-compile TEST=./$(PKG_NAME)"; \
46 go test -c $(TEST) $(TESTARGS)
49 ifeq (,$(wildcard $(GOPATH)/src/$(WEBSITE_REPO)))
50 echo "$(WEBSITE_REPO) not found in your GOPATH (necessary for layouts and assets), get-ting..."
51 git clone https://$(WEBSITE_REPO) $(GOPATH)/src/$(WEBSITE_REPO)
53 @$(MAKE) -C $(GOPATH)/src/$(WEBSITE_REPO) website-provider PROVIDER_PATH=$(shell pwd) PROVIDER_NAME=$(PKG_NAME)
56 ifeq (,$(wildcard $(GOPATH)/src/$(WEBSITE_REPO)))
57 echo "$(WEBSITE_REPO) not found in your GOPATH (necessary for layouts and assets), get-ting..."
58 git clone https://$(WEBSITE_REPO) $(GOPATH)/src/$(WEBSITE_REPO)
60 @$(MAKE) -C $(GOPATH)/src/$(WEBSITE_REPO) website-provider-test PROVIDER_PATH=$(shell pwd) PROVIDER_NAME=$(PKG_NAME)
62 .PHONY: build test testacc vet fmt fmtcheck errcheck vendor-status test-compile website website-test