bolt/Makefile

38 lines
769 B
Makefile
Raw Normal View History

2014-01-12 05:51:01 +00:00
TEST=.
BENCH=.
COVERPROFILE=/tmp/c.out
bench: benchpreq
2014-02-16 19:11:10 +00:00
go test -v -test.bench=$(BENCH)
2014-01-12 05:51:01 +00:00
2014-02-20 16:11:52 +00:00
# http://cloc.sourceforge.net/
cloc:
@cloc --not-match-f='Makefile|_test.go' .
2014-01-12 05:51:01 +00:00
cover: fmt
2014-02-09 22:52:19 +00:00
go test -coverprofile=$(COVERPROFILE) -test.run=$(TEST) .
2014-01-12 05:51:01 +00:00
go tool cover -html=$(COVERPROFILE)
rm $(COVERPROFILE)
2014-03-04 20:02:17 +00:00
cpuprofile: fmt
@go test -c
@./bolt.test -test.v -test.run="^X" -test.bench=$(BENCH) -test.cpuprofile cpu.prof
2014-03-24 13:38:27 +00:00
# go get github.com/kisielk/errcheck
errcheck:
@echo "=== errcheck ==="
@errcheck github.com/boltdb/bolt
2014-01-12 05:51:01 +00:00
fmt:
@go fmt ./...
2014-03-24 13:38:27 +00:00
test: fmt errcheck
@echo "=== TESTS ==="
2014-02-09 22:52:19 +00:00
@go test -v -cover -test.run=$(TEST)
@echo ""
@echo ""
@echo "=== RACE DETECTOR ==="
@go test -v -race -test.run=Parallel
2014-01-12 05:51:01 +00:00
2014-03-04 20:02:17 +00:00
.PHONY: bench cloc cover cpuprofile fmt memprofile test