From 00f48a1908ea80ba88bda78399a3bbfed57b2e9b Mon Sep 17 00:00:00 2001 From: Christopher Speller Date: Thu, 25 May 2017 11:01:53 -0400 Subject: Adding short unit tests by default (#6494) --- Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 6c442c318..17f225c5f 100644 --- a/Makefile +++ b/Makefile @@ -52,6 +52,8 @@ DIST_PATH=$(DIST_ROOT)/mattermost # Tests TESTS=. +TESTFLAGS ?= -short + # Packages lists TE_PACKAGES=$(shell go list ./... | grep -v vendor) TE_PACKAGES_COMMA=$(shell echo $(TE_PACKAGES) | tr ' ' ',') @@ -233,7 +235,7 @@ test-te: start-docker prepare-enterprise do-cover-file @for package in $(TE_PACKAGES); do \ echo "Testing "$$package; \ - $(GO) test $(GOFLAGS) -run=$(TESTS) -test.v -test.timeout=2000s -covermode=count -coverprofile=cprofile.out -coverpkg=$(ALL_PACKAGES_COMMA) $$package || exit 1; \ + $(GO) test $(GOFLAGS) -run=$(TESTS) $(TESTFLAGS) -test.v -test.timeout=2000s -covermode=count -coverprofile=cprofile.out -coverpkg=$(ALL_PACKAGES_COMMA) $$package || exit 1; \ if [ -f cprofile.out ]; then \ tail -n +2 cprofile.out >> cover.out; \ rm cprofile.out; \ @@ -267,7 +269,7 @@ ifeq ($(BUILD_ENTERPRISE_READY),true) $(GO) test $(GOFLAGS) -run=$(TESTS) -covermode=count -coverpkg=$(ALL_PACKAGES_COMMA) -c $$package; \ if [ -f $$(basename $$package).test ]; then \ echo "Testing "$$package; \ - ./$$(basename $$package).test -test.v -test.timeout=2000s -test.coverprofile=cprofile.out || exit 1; \ + ./$$(basename $$package).test -test.v $(TESTFLAGS) -test.timeout=2000s -test.coverprofile=cprofile.out || exit 1; \ if [ -f cprofile.out ]; then \ tail -n +2 cprofile.out >> cover.out; \ rm cprofile.out; \ -- cgit v1.2.3-1-g7c22