summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2017-05-25 11:01:53 -0400
committerJoram Wilander <jwawilander@gmail.com>2017-05-25 11:01:53 -0400
commit00f48a1908ea80ba88bda78399a3bbfed57b2e9b (patch)
tree35c042b5a45a21142bd5c430344b3041a52eef64 /Makefile
parent554938a8403a00dda36c77b288dafe374dd2430e (diff)
downloadchat-00f48a1908ea80ba88bda78399a3bbfed57b2e9b.tar.gz
chat-00f48a1908ea80ba88bda78399a3bbfed57b2e9b.tar.bz2
chat-00f48a1908ea80ba88bda78399a3bbfed57b2e9b.zip
Adding short unit tests by default (#6494)
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 4 insertions, 2 deletions
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; \