diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-20 09:16:11 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-20 09:16:11 +0000 |
commit | edaa33dee2ff2f7ea3fac488d41558eb5f86d68c (patch) | |
tree | 11f143effbfeba52329fb7afbd05e6e2a3790241 /workhorse/Makefile | |
parent | d8a5691316400a0f7ec4f83832698f1988eb27c1 (diff) | |
download | gitlab-ce-edaa33dee2ff2f7ea3fac488d41558eb5f86d68c.tar.gz |
Add latest changes from gitlab-org/gitlab@14-7-stable-eev14.7.0-rc42
Diffstat (limited to 'workhorse/Makefile')
-rw-r--r-- | workhorse/Makefile | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/workhorse/Makefile b/workhorse/Makefile index 3cf592b0cff..031fe581d28 100644 --- a/workhorse/Makefile +++ b/workhorse/Makefile @@ -65,7 +65,12 @@ install: $(EXE_ALL) .PHONY: test test: prepare-tests $(call message,$@) - go test -tags "$(BUILD_TAGS)" ./... ;\ + @if [ -z "$${GITALY_ADDRESS+x}" ] ; then \ + echo "To run gitaly integration tests set GITALY_ADDRESS=tcp://127.0.0.1:8075" ; \ + else \ + $(MAKE) run-gitaly ; \ + fi + @go test -tags "$(BUILD_TAGS)" ./... ;\ status="$$?" ;\ if [ -f "$(GITALY_PID_FILE)" ] ; then \ echo "Clean up Gitaly server for workhorse integration test" ;\ @@ -93,27 +98,24 @@ clean-build: rm -rf $(TARGET_DIR) .PHONY: prepare-tests -prepare-tests: run-gitaly prepare-tests: testdata/data/group/test.git $(EXE_ALL) prepare-tests: testdata/scratch .PHONY: run-gitaly -run-gitaly: gitaly.pid +run-gitaly: $(GITALY_PID_FILE) $(GITALY_PID_FILE): gitaly.toml - @{ \ - if [ -z "$${GITALY_ADDRESS+x}" ] ; then \ - echo "To run gitaly integration tests set GITALY_ADDRESS=tcp://127.0.0.1:8075" ; \ - else \ - cd .. ; \ - GITALY_TESTING_NO_GIT_HOOKS=1 GITALY_PID_FILE=workhorse/$(GITALY_PID_FILE) $(GITALY) workhorse/gitaly.toml ; \ - fi \ - } & + $(call message, "Starting gitaly") + cd ..; GITALY_TESTING_NO_GIT_HOOKS=1 GITALY_PID_FILE=workhorse/$(GITALY_PID_FILE) scripts/gitaly-test-spawn workhorse/gitaly.toml gitaly.toml: ../tmp/tests/gitaly/config.toml sed -e 's/^socket_path.*$$/listen_addr = "0.0.0.0:8075"/;s/^\[auth\]$$//;s/^token.*$$//;s/^internal_socket_dir.*$$//' \ $< > $@ +../tmp/tests/gitaly/config.toml: + $(call message, "Building a complete test environment") + cd .. ; ./scripts/setup-test-env + testdata/data/group/test.git: $(call message,$@) git clone --quiet --bare https://gitlab.com/gitlab-org/gitlab-test.git $@ |