forked from hazelcast/hazelcast-go-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
34 lines (24 loc) · 819 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
.PHONY: benchmark build check doc test test-all test-all-race
PORT ?= 5050
MEMBER_COUNT ?= 3
COVERAGE_OUT ?= coverage.out
TEST_FLAGS ?= -v -count 1 -timeout 50m -tags=hazelcastinternal,hazelcastinternaltest
PACKAGES = $(go list ./... | grep -v org-website)
build:
go build $(PACKAGES)
test: test-all
test-all:
env MEMBER_COUNT=$(MEMBER_COUNT) go test $(TEST_FLAGS) $(PACKAGES) ./...
test-race:
env MEMBER_COUNT=$(MEMBER_COUNT) go test $(TEST_FLAGS) -race $(PACKAGES)
test-cover:
env TEST_FLAGS="$(TEST_FLAGS)" bash ./coverage.sh
view-cover:
go tool cover -func $(COVERAGE_OUT) | grep total:
go tool cover -html $(COVERAGE_OUT) -o coverage.html
benchmark:
env MEMBER_COUNT=$(MEMBER_COUNT) go test $(TEST_FLAGS) -bench . -benchmem ./benchmarks
doc:
godoc -http=localhost:$(PORT)
check:
bash ./check.sh