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
|
||||
gorush.tar.gz
|
||||
gorush.db
|
||||
vendor
|
||||
|
|
21
Makefile
21
Makefile
|
@ -11,20 +11,23 @@ all: build
|
|||
build: clean
|
||||
sh script/build.sh
|
||||
|
||||
test: memory_test redis_test boltdb_test
|
||||
cd gorush && go test -cover -v -coverprofile=coverage.out
|
||||
|
||||
memory_test:
|
||||
cd storage/memory && go test -v -cover *.go
|
||||
test: redis_test boltdb_test memory_test config_test
|
||||
go test -cover -v -coverprofile=coverage.out ./gorush/...
|
||||
|
||||
redis_test:
|
||||
cd storage/redis && go test -v -cover *.go
|
||||
go test -v -cover -coverprofile=coverage.out ./storage/redis/...
|
||||
|
||||
boltdb_test:
|
||||
cd storage/boltdb && go test -v -cover *.go
|
||||
go test -v -cover -coverprofile=coverage.out ./storage/boltdb/...
|
||||
|
||||
html: test
|
||||
cd gorush && go tool cover -html=coverage.out
|
||||
memory_test:
|
||||
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
|
||||
tar -zcvf build.tar.gz gorush.go gorush
|
||||
|
|
Loading…
Reference in New Issue