From 70d080b69a1bce3125d8d0b83e23775880241763 Mon Sep 17 00:00:00 2001 From: Horus_Arch Date: Mon, 23 Feb 2015 12:13:32 +0100 Subject: Refactor and more unit tests. --- app/Makefile | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) (limited to 'app/Makefile') diff --git a/app/Makefile b/app/Makefile index c847c75..8624cd8 100644 --- a/app/Makefile +++ b/app/Makefile @@ -22,6 +22,18 @@ ifndef STATUS_HTTP_PORT export STATUS_HTTP_PORT:=8080 endif +ifdef TEST_RACE + RACE:=-race +else + RACE:= +endif + +ifdef TEST_VERBOSE + VERBOSE:=-v +else + VERBOSE:= +endif + IMPORT_FILE:=./import.go APP:=statuspage @@ -76,10 +88,17 @@ pack: (echo "Run \"make build\" first." && exit 1) test: - go test -v -race -tags general + go test $(RACE) $(VERBOSE) -tags general test_all: import - go test -v -race -tags all + go test $(RACE) $(VERBOSE) -v -tags all test_dependencies: import - go test -v -race -tags dep + go test $(RACE) $(VERBOSE) -tags dep + +benchmark: + go test $(VERBOSE) -bench=".*" -tags general + +benchmark_dependencies: import + export DB_STATUS_LOG=false + go test $(VERBOSE) -bench=".*" -tags dep -- cgit v1.2.3