Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-09-20 02:18:09 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-09-20 02:18:09 +0300
commit6ed4ec3e0b1340f96b7c043ef51d1b33bbe85fde (patch)
treedc4d20fe6064752c0bd323187252c77e0a89144b /workhorse/Makefile
parent9868dae7fc0655bd7ce4a6887d4e6d487690eeed (diff)
Add latest changes from gitlab-org/gitlab@15-4-stable-eev15.4.0-rc42
Diffstat (limited to 'workhorse/Makefile')
-rw-r--r--workhorse/Makefile24
1 files changed, 15 insertions, 9 deletions
diff --git a/workhorse/Makefile b/workhorse/Makefile
index fe9bf639753..a0412f5e2e1 100644
--- a/workhorse/Makefile
+++ b/workhorse/Makefile
@@ -84,8 +84,8 @@ test: prepare-tests
else \
$(MAKE) run-gitaly ; \
fi
- @go test -tags "$(BUILD_TAGS)" ./... ;\
- status="$$?" ;\
+ go test ${TEST_OPTIONS} -tags "$(BUILD_TAGS)" ./...
+ @status="$$?" ;\
if [ -f "$(GITALY_PID_FILE)" ] ; then \
echo "Clean up Gitaly server for workhorse integration test" ;\
kill -9 $$(cat $(GITALY_PID_FILE)) ;\
@@ -96,10 +96,21 @@ test: prepare-tests
exit "$$status"
@echo SUCCESS
+.PHONY: test-race
+test-race: TEST_OPTIONS = -race
+test-race: test
+
+.PHONY: test-coverage
+test-coverage: TEST_OPTIONS = -cover -coverprofile=cover.out
+test-coverage: test
+ $(call message, "Calculating the coverage")
+ [ -f cover.out ] && go tool cover -html cover.out -o coverage.html
+ [ -f cover.out ] && go tool cover -func cover.out
+
.PHONY: clean
clean: clean-workhorse clean-build
$(call message,$@)
- rm -rf testdata/data testdata/scratch
+ rm -rf testdata/data testdata/scratch cover.out coverage.html
.PHONY: clean-workhorse
clean-workhorse:
@@ -112,8 +123,7 @@ clean-build:
rm -rf $(TARGET_DIR)
.PHONY: prepare-tests
-prepare-tests: testdata/data/group/test.git $(EXE_ALL)
-prepare-tests: testdata/scratch
+prepare-tests: testdata/scratch $(EXE_ALL)
.PHONY: run-gitaly
run-gitaly: $(GITALY_PID_FILE)
@@ -130,10 +140,6 @@ gitaly.toml: ../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 $@
-
testdata/scratch:
mkdir -p testdata/scratch