Makefile: add test target

Signed-off-by: Pierre-Alain TORET <pierre-alain.toret@protonmail.com>
This commit is contained in:
Pierre-Alain TORET 2018-06-10 16:32:12 +02:00 committed by daftaupe
parent c59a53515c
commit 08c708341b
2 changed files with 8 additions and 0 deletions

View File

@ -28,6 +28,8 @@ DB_DEVEL_ROOT_DIR = $(DEVEL_BUILD_DIR)/db
DB_PROD_BUILD_DIR = $(DB_BUILD_DIR)/$(PROD_BUILD_DIR) DB_PROD_BUILD_DIR = $(DB_BUILD_DIR)/$(PROD_BUILD_DIR)
DB_PROD_ROOT_DIR = $(PROD_BUILD_DIR)/db DB_PROD_ROOT_DIR = $(PROD_BUILD_DIR)/db
test: api
devel: frontend api templates db devel-copy devel: frontend api templates db devel-copy
prod: frontend api templates db prod-copy prod: frontend api templates db prod-copy

View File

@ -11,6 +11,8 @@ GO_DEVEL_BUILD_BINARY = $(GO_DEVEL_BUILD_DIR)/commento-ce
GO_PROD_BUILD_DIR = $(PROD_BUILD_DIR) GO_PROD_BUILD_DIR = $(PROD_BUILD_DIR)
GO_PROD_BUILD_BINARY = $(GO_PROD_BUILD_DIR)/commento-ce GO_PROD_BUILD_BINARY = $(GO_PROD_BUILD_DIR)/commento-ce
test: test-go
devel: devel-go devel: devel-go
prod: prod-go prod: prod-go
@ -30,4 +32,8 @@ prod-go:
go get . go get .
go build -i -v -o $(GO_PROD_BUILD_BINARY) go build -i -v -o $(GO_PROD_BUILD_BINARY)
test-go:
go get .
go test -v .
$(shell mkdir -p $(GO_DEVEL_BUILD_DIR) $(GO_PROD_BUILD_DIR)) $(shell mkdir -p $(GO_DEVEL_BUILD_DIR) $(GO_PROD_BUILD_DIR))