forked from vmware/govmomi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
33 lines (24 loc) · 856 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
33
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 '^$$'
@! TERM=xterm git grep encoding/xml -- '*.go' ':!vim25/xml/*.go'
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