Add all test in Makefile.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
parent
a08b2da725
commit
40902070c5
|
@ -33,3 +33,4 @@ gorush/log/*.log
|
||||||
build.tar.gz
|
build.tar.gz
|
||||||
gorush.tar.gz
|
gorush.tar.gz
|
||||||
gorush.db
|
gorush.db
|
||||||
|
vendor
|
||||||
|
|
21
Makefile
21
Makefile
|
@ -11,20 +11,23 @@ all: build
|
||||||
build: clean
|
build: clean
|
||||||
sh script/build.sh
|
sh script/build.sh
|
||||||
|
|
||||||
test: memory_test redis_test boltdb_test
|
test: redis_test boltdb_test memory_test config_test
|
||||||
cd gorush && go test -cover -v -coverprofile=coverage.out
|
go test -cover -v -coverprofile=coverage.out ./gorush/...
|
||||||
|
|
||||||
memory_test:
|
|
||||||
cd storage/memory && go test -v -cover *.go
|
|
||||||
|
|
||||||
redis_test:
|
redis_test:
|
||||||
cd storage/redis && go test -v -cover *.go
|
go test -v -cover -coverprofile=coverage.out ./storage/redis/...
|
||||||
|
|
||||||
boltdb_test:
|
boltdb_test:
|
||||||
cd storage/boltdb && go test -v -cover *.go
|
go test -v -cover -coverprofile=coverage.out ./storage/boltdb/...
|
||||||
|
|
||||||
html: test
|
memory_test:
|
||||||
cd gorush && go tool cover -html=coverage.out
|
go test -v -cover -coverprofile=coverage.out ./storage/memory/...
|
||||||
|
|
||||||
|
config_test:
|
||||||
|
go test -v -cover -coverprofile=coverage.out ./config/...
|
||||||
|
|
||||||
|
html:
|
||||||
|
go tool cover -html=coverage.out
|
||||||
|
|
||||||
docker_build: clean
|
docker_build: clean
|
||||||
tar -zcvf build.tar.gz gorush.go gorush
|
tar -zcvf build.tar.gz gorush.go gorush
|
||||||
|
|
Loading…
Reference in New Issue