-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (30 loc) · 903 Bytes
/
Copy pathMakefile
File metadata and controls
40 lines (30 loc) · 903 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
33
34
35
36
37
38
39
40
.PHONY: build test race bench vet fmt cover clean demo
# Build both binaries into ./bin.
build:
go build -o bin/kvserver ./cmd/kvserver
go build -o bin/kvclient ./cmd/kvclient
# Run the full suite.
test:
go test ./...
# Run the full suite under the race detector. This is the gate that matters for
# a concurrent system; CI runs this.
race:
go test -race ./...
# Run a single category, e.g. make category C=A runs leader-election tests.
category:
go test -race -run TestCategory$(C) ./... -v
# Record the performance numbers (not a strict pass/fail).
bench:
go test -run TestCategoryH ./kvserver/ -v
vet:
go vet ./...
fmt:
gofmt -w .
cover:
go test -coverprofile=coverage.txt ./raft/ ./kvserver/
go tool cover -func=coverage.txt | tail -1
clean:
rm -rf bin coverage.txt data-node-*
# Bring up a local three-node cluster and run a short scripted demo.
demo: build
./scripts/demo.sh