From 40902070c5dbb0cf38fbd5e401ec1392f883d510 Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Wed, 4 May 2016 09:29:36 +0800 Subject: [PATCH] Add all test in Makefile. Signed-off-by: Bo-Yi Wu --- .gitignore | 1 + Makefile | 21 ++++++++++++--------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index 91a8b23..0302cf1 100644 --- a/.gitignore +++ b/.gitignore @@ -33,3 +33,4 @@ gorush/log/*.log build.tar.gz gorush.tar.gz gorush.db +vendor diff --git a/Makefile b/Makefile index d94e559..98917ce 100644 --- a/Makefile +++ b/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