-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
32 lines (26 loc) · 852 Bytes
/
Makefile
File metadata and controls
32 lines (26 loc) · 852 Bytes
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
all: lint build
.PHONY: lint test build
lint:
go tool staticcheck ./...
.PHONY: fuzz-smoke
fuzz-smoke: lint
# Smoke tests on fuzzing targets.
go test -fuzz='\QFuzzBasicMapAdd\E' -fuzztime=10s ./set
go test -fuzz='\QFuzzBasicMapItems\E' -fuzztime=10s ./set
go test -fuzz='\QFuzzBasicMapUnion\E' -fuzztime=10s ./set
.PHONY: bench
bench:
# Run this when modifying the code to obtain data to update BENCHMARKS.md
go test -bench=Benchmark ./...
.PHONY: cover
cover:
# This runs the benchmarks just once, as unit tests, for coverage reporting only.
# It does not replace running "make bench".
go test -v -race -run=. -bench=. -benchtime=1x -coverprofile=coverage/cover.out -covermode=atomic ./...
.PHONY: test
test:
# This includes the fuzz tests in unit test mode
go test -race ./...
.PHONY: build
build: test fuzz-smoke
go build ./...