Cleaning up make test-client. Adding to build. (#2984)
Этот коммит содержится в:
41
Makefile
41
Makefile
@@ -1,4 +1,4 @@
|
||||
.PHONY: build package run stop run-client run-server stop-client stop-server restart-server restart-client start-docker clean-dist clean nuke check-style check-unit-tests test dist setup-mac prepare-enteprise run-client-tests setup-run-client-tests cleanup-run-client-tests test-client build-linux build-osx build-windows
|
||||
.PHONY: build package run stop run-client run-server stop-client stop-server restart-server restart-client start-docker clean-dist clean nuke check-style check-client-style check-server-style check-unit-tests test dist setup-mac prepare-enteprise run-client-tests setup-run-client-tests cleanup-run-client-tests test-client build-linux build-osx build-windows internal-test-client
|
||||
|
||||
# For golang 1.5.x compatibility (remove when we don't want to support it anymore)
|
||||
export GO15VENDOREXPERIMENT=1
|
||||
@@ -132,7 +132,12 @@ clean-docker:
|
||||
docker rm -v mattermost-openldap > /dev/null; \
|
||||
fi
|
||||
|
||||
check-style:
|
||||
check-client-style:
|
||||
@echo Checking client style
|
||||
|
||||
cd $(BUILD_WEBAPP_DIR) && $(MAKE) check-style
|
||||
|
||||
check-server-style:
|
||||
@echo Running GOFMT
|
||||
$(eval GOFMT_OUTPUT := $(shell gofmt -d -s api/ model/ store/ utils/ manualtesting/ einterfaces/ mattermost.go 2>&1))
|
||||
@echo "$(GOFMT_OUTPUT)"
|
||||
@@ -143,14 +148,16 @@ check-style:
|
||||
exit 1; \
|
||||
fi
|
||||
|
||||
test: prepare-enteprise start-docker
|
||||
@echo Running tests
|
||||
check-style: check-client-style check-server-style
|
||||
|
||||
#$(GO) test $(GOFLAGS) -run=$(TESTS) -test.v -test.timeout=340s ./api || exit 1
|
||||
#$(GO) test $(GOFLAGS) -run=$(TESTS) -test.v -test.timeout=12s ./model || exit 1
|
||||
#$(GO) test $(GOFLAGS) -run=$(TESTS) -test.v -test.timeout=180s ./store || exit 1
|
||||
#$(GO) test $(GOFLAGS) -run=$(TESTS) -test.v -test.timeout=120s ./utils || exit 1
|
||||
#$(GO) test $(GOFLAGS) -run=$(TESTS) -test.v -test.timeout=120s ./web || exit 1
|
||||
test-server: start-docker prepare-enterprise
|
||||
@echo Running server tests
|
||||
|
||||
$(GO) test $(GOFLAGS) -run=$(TESTS) -test.v -test.timeout=340s ./api || exit 1
|
||||
$(GO) test $(GOFLAGS) -run=$(TESTS) -test.v -test.timeout=12s ./model || exit 1
|
||||
$(GO) test $(GOFLAGS) -run=$(TESTS) -test.v -test.timeout=180s ./store || exit 1
|
||||
$(GO) test $(GOFLAGS) -run=$(TESTS) -test.v -test.timeout=120s ./utils || exit 1
|
||||
$(GO) test $(GOFLAGS) -run=$(TESTS) -test.v -test.timeout=120s ./web || exit 1
|
||||
ifeq ($(BUILD_ENTERPRISE_READY),true)
|
||||
@echo Running Enterprise tests
|
||||
$(GO) test $(GOFLAGS) -run=$(TESTS) -c ./enterprise/ldap && ./ldap.test -test.v -test.timeout=120s || exit 1
|
||||
@@ -159,19 +166,15 @@ ifeq ($(BUILD_ENTERPRISE_READY),true)
|
||||
rm -r compliance.test
|
||||
endif
|
||||
|
||||
setup-run-client-tests:
|
||||
sed -i'.bak' 's|"EnableOpenServer": false,|"EnableOpenServer": true,|g' config/config.json
|
||||
internal-test-client: start-docker prepare-enterprise
|
||||
$(GO) run $(GOFLAGS) *.go -run_client_tests
|
||||
|
||||
cleanup-run-client-tests:
|
||||
sed -i'.bak' 's|"EnableOpenServer": true,|"EnableOpenServer": false,|g' config/config.json
|
||||
test-client: start-docker prepare-enterprise
|
||||
@echo Running client tests
|
||||
|
||||
run-client-tests:
|
||||
cd $(BUILD_WEBAPP_DIR) && $(MAKE) test
|
||||
sleep 10
|
||||
@echo Running client side unit tests
|
||||
cd $(BUILD_WEBAPP_DIR) && npm test
|
||||
|
||||
test-client: setup-run-client-tests run-server run-client-tests stop-server cleanup-run-client-tests
|
||||
test: test-server test-client
|
||||
|
||||
.prebuild:
|
||||
@echo Preparation for running go code
|
||||
@@ -323,6 +326,8 @@ clean: stop-docker
|
||||
rm -rf logs
|
||||
|
||||
rm -f mattermost.log
|
||||
rm -f npm-debug.log
|
||||
rm -f api/mattermost.log
|
||||
rm -f .prepare-go
|
||||
rm -f enterprise
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user