1.PHONY: test 2 3all: check test 4 5check: goimports govet 6 7goimports: 8 @echo checking go imports... 9 @command -v goimports >/dev/null 2>&1 || go get golang.org/x/tools/cmd/goimports 10 @! goimports -d . 2>&1 | egrep -v '^$$' 11 12govet: 13 @echo checking go vet... 14 @go tool vet -structtags=false -methods=false $$(find . -mindepth 1 -maxdepth 1 -type d -not -name vendor) 15 16install: 17 $(MAKE) -C govc install 18 $(MAKE) -C vcsim install 19 20go-test: 21 GORACE=history_size=5 go test -timeout 5m -count 1 -race -v $(TEST_OPTS) ./... 22 23govc-test: install 24 (cd govc/test && ./vendor/github.com/sstephenson/bats/libexec/bats -t .) 25 26test: go-test govc-test 27 28doc: install 29 ./govc/usage.sh > ./govc/USAGE.md 30