2016-04-06 00:00:32 +00:00
|
|
|
.PHONY: test
|
|
|
|
|
|
|
|
all: check test
|
|
|
|
|
|
|
|
check: goimports govet
|
|
|
|
|
2016-07-19 06:20:30 +00:00
|
|
|
goimports:
|
2016-04-06 00:00:32 +00:00
|
|
|
@echo checking go imports...
|
2016-07-19 06:20:30 +00:00
|
|
|
@go get golang.org/x/tools/cmd/goimports
|
2016-04-06 00:00:32 +00:00
|
|
|
@! goimports -d . 2>&1 | egrep -v '^$$'
|
|
|
|
|
|
|
|
govet:
|
|
|
|
@echo checking go vet...
|
2017-11-17 04:13:29 +00:00
|
|
|
@go tool vet -structtags=false -methods=false $$(find . -mindepth 1 -maxdepth 1 -type d -not -name vendor)
|
2016-04-06 00:00:32 +00:00
|
|
|
|
2017-11-17 04:13:29 +00:00
|
|
|
install:
|
|
|
|
go install -v github.com/vmware/govmomi/govc
|
|
|
|
go install -v github.com/vmware/govmomi/vcsim
|
|
|
|
|
|
|
|
go-test:
|
2018-08-03 20:24:51 +00:00
|
|
|
GORACE=history_size=5 go test -timeout 5m -count 1 -race -v $(TEST_OPTS) ./...
|
2016-04-06 00:00:32 +00:00
|
|
|
|
2017-11-17 04:13:29 +00:00
|
|
|
govc-test: install
|
|
|
|
(cd govc/test && ./vendor/github.com/sstephenson/bats/libexec/bats -t .)
|
|
|
|
|
|
|
|
test: go-test govc-test
|
2017-02-17 00:12:01 +00:00
|
|
|
|
|
|
|
doc: install
|
|
|
|
./govc/usage.sh > ./govc/USAGE.md
|