...
1all: testdeps
2 go test ./...
3 go test ./... -short -race
4 env GOOS=linux GOARCH=386 go test ./...
5 go vet
6 go get github.com/gordonklaus/ineffassign
7 ineffassign .
8
9testdeps: testdata/redis/src/redis-server
10
11bench: testdeps
12 go test ./... -test.run=NONE -test.bench=. -test.benchmem
13
14.PHONY: all test testdeps bench
15
16testdata/redis:
17 mkdir -p $@
18 wget -qO- https://github.com/antirez/redis/archive/5.0.tar.gz | tar xvz --strip-components=1 -C $@
19
20testdata/redis/src/redis-server: testdata/redis
21 sed -i.bak 's/libjemalloc.a/libjemalloc.a -lrt/g' $</src/Makefile
22 cd $< && make all
View as plain text