forked from vmware/govmomi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
32 lines (23 loc) · 790 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
GO ?= go
pkgs = $(shell $(GO) list ./... | grep -v 'github.com/vmware/govmomi/vim25/xml')
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
@! goimports -d . 2>&1 | egrep -v '^$$'
govet:
@echo checking go vet...
@$(GO) vet -structtag=false -methods=false $(pkgs)
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
doc: install
./govc/usage.sh > ./govc/USAGE.md