-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
43 lines (32 loc) · 1.1 KB
/
Makefile
File metadata and controls
43 lines (32 loc) · 1.1 KB
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
# make command will take additional argument string as MKARGS
# e.g., make test-race MKARGS="-timeout 180s"
# folder name of the package of interest
PKGNAME = raft
MKARGS = -timeout 3600s
.PHONY: build test test-race checkpoint checkpoint-race clean docs
.SILENT: build test test-race checkpoint checkpoint-race clean docs
# compile the remote library.
build:
cd src/$(PKGNAME); go build $(PKGNAME).go
# run conformance tests.
test: build
cd src/$(PKGNAME); go test -v $(MKARGS)
checkpoint: build
cd src/$(PKGNAME); go test -v $(MKARGS) -run Checkpoint
test-race: build
cd src/$(PKGNAME); go test -v -race $(MKARGS)
checkpoint-race: build
cd src/$(PKGNAME); go test -v -race $(MKARGS) -run Checkpoint
# delete executable and docs, leaving only source
clean:
rm -rf src/$(PKGNAME)/$(PKGNAME) src/$(PKGNAME)/$(PKGNAME)-doc.txt
# generate documentation for the package of interest
docs:
cd src/$(PKGNAME); go doc -u -all > $(PKGNAME)-doc.txt
mytest:
cd src/$(PKGNAME); go test -v -run TestFinal_Backup
test-loop:
for i in $$(seq 1 30); do \
cd src/$(PKGNAME); \
go test -v -run TestFinal_Rejoin; \
done