2015-01-24 15:12:48 +03:00
|
|
|
all: testdeps
|
2016-03-16 17:57:24 +03:00
|
|
|
go test ./...
|
|
|
|
go test ./... -short -race
|
2019-05-25 17:42:01 +03:00
|
|
|
go test ./... -run=NONE -bench=.
|
2018-03-07 13:20:26 +03:00
|
|
|
env GOOS=linux GOARCH=386 go test ./...
|
2016-11-06 14:29:32 +03:00
|
|
|
go vet
|
2018-11-21 12:09:21 +03:00
|
|
|
go get github.com/gordonklaus/ineffassign
|
|
|
|
ineffassign .
|
2015-01-24 15:12:48 +03:00
|
|
|
|
2016-03-12 13:25:59 +03:00
|
|
|
testdeps: testdata/redis/src/redis-server
|
2015-01-24 15:12:48 +03:00
|
|
|
|
2016-03-12 13:38:52 +03:00
|
|
|
bench: testdeps
|
|
|
|
go test ./... -test.run=NONE -test.bench=. -test.benchmem
|
|
|
|
|
|
|
|
.PHONY: all test testdeps bench
|
2015-01-24 15:12:48 +03:00
|
|
|
|
2016-03-12 13:25:59 +03:00
|
|
|
testdata/redis:
|
2015-01-24 15:12:48 +03:00
|
|
|
mkdir -p $@
|
2019-01-21 17:10:26 +03:00
|
|
|
wget -qO- https://github.com/antirez/redis/archive/5.0.tar.gz | tar xvz --strip-components=1 -C $@
|
2015-01-24 15:12:48 +03:00
|
|
|
|
2016-03-12 13:25:59 +03:00
|
|
|
testdata/redis/src/redis-server: testdata/redis
|
2018-02-27 21:05:21 +03:00
|
|
|
sed -i.bak 's/libjemalloc.a/libjemalloc.a -lrt/g' $</src/Makefile
|
2015-01-24 15:12:48 +03:00
|
|
|
cd $< && make all
|