Skip to content

Commit

Permalink
Merge pull request nutanix#18 from nutanix/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
crizstian authored Apr 30, 2018
2 parents 9ff701a + 60db7a1 commit 43dd1d9
Show file tree
Hide file tree
Showing 45 changed files with 6,731 additions and 2,111 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
# Binaries for programs and plugins
*.exe
*.dll
*.so
*.dylib
*.tfstate
*.tfstate.backup
*.terraform*
*.log
setenv.sh
request_log
cmd/terraform-provider-*
cmd/cmd
cmd/main.tf
.DS_Store

# Test binary, build with `go test -c`
*.test
Expand Down
47 changes: 47 additions & 0 deletions GNUmakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
TEST?=$$(go list ./... |grep -v 'vendor')
GOFMT_FILES?=$$(find . -name '*.go' |grep -v vendor)

default: build

build: fmtcheck
go install

test: fmtcheck
go test -i $(TEST) || exit 1
echo $(TEST) | \
xargs -t -n4 go test $(TESTARGS) -timeout=30s -parallel=4

testacc: fmtcheck
TF_ACC=1 go test $(TEST) -v $(TESTARGS) -timeout 120m

vet:
@echo "go vet ."
@go vet $$(go list ./... | grep -v vendor/) ; if [ $$? -eq 1 ]; then \
echo ""; \
echo "Vet found suspicious constructs. Please check the reported constructs"; \
echo "and fix them if necessary before submitting the code for review."; \
exit 1; \
fi

fmt:
gofmt -w $(GOFMT_FILES)

fmtcheck:
@sh -c "'$(CURDIR)/scripts/gofmtcheck.sh'"

errcheck:
@sh -c "'$(CURDIR)/scripts/errcheck.sh'"

vendor-status:
@govendor status

test-compile:
@if [ "$(TEST)" = "./..." ]; then \
echo "ERROR: Set TEST to a specific package. For example,"; \
echo " make test-compile TEST=./aws"; \
exit 1; \
fi
go test -c $(TEST) $(TESTARGS)

.PHONY: build test testacc vet fmt fmtcheck errcheck vendor-status test-compile

Loading

0 comments on commit 43dd1d9

Please sign in to comment.