forked from amirylm/lockfree
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
31 lines (22 loc) · 766 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
TEST_PKG?=./...
lint-prepare:
@curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s latest
lint:
test -f ./bin/golangci-lint || make lint-prepare
./bin/golangci-lint run -v --timeout=5m ./...
lint-docker:
@docker run --rm -v $(shell pwd):/app -w /app golangci/golangci-lint:latest golangci-lint run -v --timeout=5m ./...
fmt:
@go fmt ./...
test:
@go test -v -race -timeout=10m ${TEST_PKG}
test-cov:
@go test -v -race -timeout=10m -coverprofile cover.out ./stack ./ringbuffer ./queue ./reactor
test-open-cov:
@make test-cov
@go tool cover -html cover.out -o cover.html
open cover.html
bench:
@go test -benchmem -bench ^Bench_* ./benchmark
bench-load:
@go test -benchmem -bench ^Bench_* ./benchmark/load/...