-
Notifications
You must be signed in to change notification settings - Fork 52
/
makefile
53 lines (40 loc) · 1.04 KB
/
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
EXTERNAL_TOOLS=\
golang.org/x/tools/cmd/cover \
golang.org/x/tools/cmd/vet \
github.com/mattn/goveralls \
github.com/stretchr/testify/assert
all: all-tests
@echo "*** Done!"
get:
@echo "*** Resolve dependencies..."
@go get -v .
all-tests:
@echo "*** Run tests..."
@go test .
benchmark:
@echo "*** Run benchmarks..."
@go test -v -benchmem -bench=. -run=^a
test-race:
@echo "*** Run tests with race condition..."
@go test --race -v .
test-cover-builder:
@go test -covermode=count -coverprofile=/tmp/art.out .
@rm -f /tmp/art_coverage.out
@echo "mode: count" > /tmp/art_coverage.out
@cat /tmp/art.out | tail -n +2 >> /tmp/art_coverage.out
@rm /tmp/art.out
test-cover: test-cover-builder
@go tool cover -html=/tmp/art_coverage.out
build:
@echo "*** Build project..."
@go build -v .
build-asm:
@go build -a -work -v -gcflags="-S -B -C" .
build-race:
@echo "*** Build project with race condition..."
@go build --race -v .
bootstrap:
@for tool in $(EXTERNAL_TOOLS) ; do \
echo "Installing $$tool" ; \
go get $$tool; \
done