summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorChris <ccbrown112@gmail.com>2017-10-12 12:24:54 -0700
committerChristopher Speller <crspeller@gmail.com>2017-10-12 12:24:54 -0700
commit917e4789c2fde00bcae0f0ccc82b3c3815e1d38a (patch)
tree115270abbda7c7991fbfc419aff465b29fec1f88 /Makefile
parent86a0e16035fa94487c606d925fd856164481a60f (diff)
downloadchat-917e4789c2fde00bcae0f0ccc82b3c3815e1d38a.tar.gz
chat-917e4789c2fde00bcae0f0ccc82b3c3815e1d38a.tar.bz2
chat-917e4789c2fde00bcae0f0ccc82b3c3815e1d38a.zip
Use tmpfs containers for api/api4 tests, move and speed up CLI tests (#7606)
* use tmpfs containers for api/api4, move and speed up cli tests * minor optimizations * add missing files, fix pre-existing race condition * add . to TestMain check * add requested log message
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile12
1 files changed, 7 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 4b70b09b6..2643b8aa2 100644
--- a/Makefile
+++ b/Makefile
@@ -56,6 +56,8 @@ GO_LINKER_FLAGS ?= -ldflags \
# GOOS/GOARCH of the build host, used to determine whether we're cross-compiling or not
BUILDER_GOOS_GOARCH="$(shell $(GO) env GOOS)_$(shell $(GO) env GOARCH)"
+PLATFORM_FILES=$(shell ls -1 ./cmd/platform/*.go | grep -v _test.go)
+
# Output paths
DIST_ROOT=dist
DIST_PATH=$(DIST_ROOT)/mattermost
@@ -328,10 +330,10 @@ endif
test-server: test-te test-ee
internal-test-web-client:
- $(GO) run $(GOFLAGS) ./cmd/platform/*go test web_client_tests
+ $(GO) run $(GOFLAGS) $(PLATFORM_FILES) test web_client_tests
run-server-for-web-client-tests:
- $(GO) run $(GOFLAGS) ./cmd/platform/*go test web_client_tests_server
+ $(GO) run $(GOFLAGS) $(PLATFORM_FILES) test web_client_tests_server
test-client:
@echo Running client tests
@@ -350,13 +352,13 @@ run-server: start-docker
@echo Running mattermost for development
mkdir -p $(BUILD_WEBAPP_DIR)/dist/files
- $(GO) run $(GOFLAGS) $(GO_LINKER_FLAGS) ./cmd/platform/*.go --disableconfigwatch &
+ $(GO) run $(GOFLAGS) $(GO_LINKER_FLAGS) $(PLATFORM_FILES) --disableconfigwatch &
run-cli: start-docker
@echo Running mattermost for development
@echo Example should be like 'make ARGS="-version" run-cli'
- $(GO) run $(GOFLAGS) $(GO_LINKER_FLAGS) ./cmd/platform/*.go ${ARGS}
+ $(GO) run $(GOFLAGS) $(GO_LINKER_FLAGS) $(PLATFORM_FILES) ${ARGS}
run-client:
@echo Running mattermost client for development
@@ -407,7 +409,7 @@ restart-client: | stop-client run-client
run-job-server:
@echo Running job server for development
- $(GO) run $(GOFLAGS) $(GO_LINKER_FLAGS) ./cmd/platform/*.go jobserver --disableconfigwatch &
+ $(GO) run $(GOFLAGS) $(GO_LINKER_FLAGS) $(PLATFORM_FILES) jobserver --disableconfigwatch &
clean: stop-docker
@echo Cleaning