packer-cn/vendor/github.com/vmware/govmomi/Makefile

33 lines
790 B
Makefile
Raw Normal View History

GO ?= go
pkgs = $(shell $(GO) list ./... | grep -v 'github.com/vmware/govmomi/vim25/xml')
2017-07-09 14:56:39 -04:00
all: check test
check: goimports govet
goimports:
@echo checking go imports...
@command -v goimports >/dev/null 2>&1 || $(GO) get golang.org/x/tools/cmd/goimports
2017-07-09 14:56:39 -04:00
@! goimports -d . 2>&1 | egrep -v '^$$'
govet:
@echo checking go vet...
@$(GO) vet -structtag=false -methods=false $(pkgs)
2017-07-09 14:56:39 -04:00
install:
$(MAKE) -C govc install
$(MAKE) -C vcsim install
go-test:
GORACE=history_size=5 $(GO) test -timeout 5m -count 1 -race -v $(TEST_OPTS) ./...
govc-test: install
./govc/test/images/update.sh
(cd govc/test && ./vendor/github.com/sstephenson/bats/libexec/bats -t .)
.PHONY: test
test: go-test govc-test
2017-07-09 14:56:39 -04:00
doc: install
./govc/usage.sh > ./govc/USAGE.md