forked from open-telemetry/opentelemetry-collector
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.Common
47 lines (37 loc) · 1016 Bytes
/
Makefile.Common
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
# ALL_PKGS is the list of all packages where ALL_SRC files reside.
ALL_PKGS := $(sort $(shell go list ./...))
# Use a single process (-p 1) on go test to avoid tests clashing on machine
# wide resources, e.g. ports.
GOTEST_OPT?= -v -p 1 -race -timeout 60s
GOTEST=go test
GO_ACC=go-acc
LINT=golangci-lint
IMPI=impi
.PHONY: test
test:
$(GOTEST) $(GOTEST_OPT) ./...
.PHONY: test-unstable
test-unstable:
$(GOTEST) $(GOTEST_OPT) -tags enable_unstable ./...
.PHONY: test-with-cover
test-with-cover:
$(GO_ACC) --output=coverage.out ./...
.PHONY: benchmark
benchmark:
$(GOTEST) -bench=. -run=notests ./...
.PHONY: fmt
fmt:
gofmt -w -s ./
goimports -w -local go.opentelemetry.io/collector ./
.PHONY: lint
lint:
$(LINT) run --allow-parallel-runners
.PHONY: lint-unstable
lint-unstable:
$(LINT) run --allow-parallel-runners --build-tags enable_unstable
.PHONY: porto
porto:
porto -w --include-internal ./
.PHONY: impi
impi:
@$(IMPI) --local go.opentelemetry.io/collector --scheme stdThirdPartyLocal ./...