-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathMakefile
27 lines (20 loc) · 804 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
.PHONY: test lint fuzz fuzz-all
inline:
go build -gcflags='-m ' ./... | grep -v 'can inline'
lint:
@golangci-lint --config=.golangci.yaml run ./... -v
test:
# run all unit-tests, ignore fuzz tests
@go test -tags='!fuzz' -race -failfast -coverpkg=./... -coverprofile=coverage.out -covermode=atomic ./...
@go tool cover -html=coverage.out
fuzz:
$(eval fuzzName := $(filter-out $@,$(MAKECMDGOALS)))
@go test -tags='fuzz' -run=Fuzz -fuzz=$(fuzzName) -fuzztime=30s -timeout=10m
fuzz-all:
$(eval fuzzTime := $(filter-out $@,$(MAKECMDGOALS)))
@sh scripts/fuzz-all.sh $(fuzzTime)
bench:
@go test -bench=BenchmarkGVString -benchmem -benchmem -memprofile=mem.out -cpuprofile=cpu.out -run NONE
# https://stackoverflow.com/questions/6273608/how-to-pass-argument-to-makefile-from-command-line
%:
@