| 1 |
all: testdeps |
| 2 |
go test ./... |
| 3 |
go test ./... -short -race |
| 4 |
go vet |
| 5 |
|
| 6 |
testdeps: testdata/redis/src/redis-server |
| 7 |
|
| 8 |
bench: testdeps |
| 9 |
go test ./... -test.run=NONE -test.bench=. -test.benchmem |
| 10 |
|
| 11 |
.PHONY: all test testdeps bench |
| 12 |
|
| 13 |
testdata/redis: |
| 14 |
mkdir -p $@ |
| 15 |
wget -qO- https://github.com/antirez/redis/archive/unstable.tar.gz | tar xvz --strip-components=1 -C $@ |
| 16 |
|
| 17 |
testdata/redis/src/redis-server: testdata/redis |
| 18 |
sed -i 's/libjemalloc.a/libjemalloc.a -lrt/g' $</src/Makefile |
| 19 |
cd $< && make all |