-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
executable file
·62 lines (47 loc) · 1.36 KB
/
Makefile
File metadata and controls
executable file
·62 lines (47 loc) · 1.36 KB
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
53
54
55
56
57
58
59
60
61
62
.DEFAULT_GOAL: test-unit
############
# Building #
############
build-agent: ## Build agent binary
go build -o ./bin/agent ./cmd/agent
.PHONY: build-agent
build-lpr-cli: ## Build client binary
go build -o ./bin/lpr ./cmd/cli
.PHONY: build-agent
###########
# Testing #
###########
test-unit: ## Execute unit tests
go test -v -race -count=1 ./...
.PHONY: test-unit
test-unit-hammer: ## Execute hammer tests in the project to spot eventual test instability
go test -count=100 -short -failfast ./...
.PHONY: test-unit-hammer
test-cover-html: ## Generate file with unit test coverage data
go test -v -race -count=1 -coverprofile=./coverage.txt ./...
go tool cover -html=./coverage.txt
.PHONY: test-cover-html
test-lint:
./hack/run-lint.sh
.PHONY: test-lint
###############
# Development #
###############
fix-lint-issues:
LINT_FORCE_FIX=true ./hack/run-lint.sh
.PHONY: fix-lint
##############
# Generating #
##############
gen-grpc-resources: ## Generate gRPC + ProtoBuf Go code for client and server
./hack/gen-grpc-resources.sh
.PHONY: gen-proto-source-code
gen-certs: ## Generate certificates for client and server
./hack/gen-certs.sh
.PHONY: gen-proto-source-code
#############
# Other #
#############
help: ## Show this help
@egrep -h '\s##\s' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
.PHONY: help