forked from dmacvicar/terraform-provider-libvirt
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
52 lines (39 loc) · 1.14 KB
/
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
LDFLAGS += -X version.ProviderVersion=$$(git describe --always --abbrev=40 --dirty)
# default args for tests
TEST_ARGS_DEF := -covermode=count -coverprofile=profile.cov
default: build
terraform-provider-libvirt:
go build -ldflags "${LDFLAGS}"
build: terraform-provider-libvirt
install:
go install -ldflags "${LDFLAGS}"
# unit tests
# usage:
# - run all the unit tests: make test
# - run some particular test: make test TEST_ARGS="-run TestAccLibvirtDomain_Cpu"
test:
go test -v $(TEST_ARGS_DEF) $(TEST_ARGS) ./libvirt
# acceptance tests
# usage:
#
# - run all the acceptance tests:
# make testacc
#
# - run some particular test:
# make testacc TEST_ARGS="-run TestAccLibvirtDomain_Cpu"
#
# - run all the network test with a verbose loglevel:
# TF_LOG=DEBUG make testacc TEST_ARGS="-run TestAccLibvirtNet*"
#
testacc:
./travis/run-tests-acceptance $(TEST_ARGS)
golangcilint:
golangci-lint run
tflint:
terraform fmt -write=false -check=true -diff=true examples/
lint: golangcilint tflint
clean:
rm -f terraform-provider-libvirt
cleanup:
./travis/cleanup.sh
.PHONY: build install test testacc tflint golangcilint lint terraform-provider-libvirt