forked from ovn-org/libovsdb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
39 lines (29 loc) · 782 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
34
35
36
37
38
39
.PHONY: all local test test-local integration-test-local install-deps lint fmt
all: test
local: install-deps fmt lint build-local test-local bench-local
build-local:
@echo "+ $@"
@go build -v ./...
test-local:
@echo "+ $@"
@go test -race -coverprofile=unit.cov -short -v ./...
bench-local:
@echo "+ $@"
@go test -run=XXX -count=3 -bench=. ./... | tee bench.out
@benchstat bench.out
integration-test-local:
@echo "+ $@"
@go test -race -v -coverprofile=integration.cov -run Integration ./...
test:
@docker-compose pull
@docker-compose run --rm test
install-deps:
@echo "+ $@"
@golangci-lint --version
@go install golang.org/x/perf/cmd/benchstat@latest
lint:
@echo "+ $@"
@golangci-lint run
fmt:
@echo "+ $@"
@test -z "$$(gofmt -s -l . | tee /dev/stderr)"