diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-08 18:12:29 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-08 18:12:29 +0300 |
commit | f8c7f38d02ebf964cbf40d9445f0f9f843710701 (patch) | |
tree | 755d5c384a0f64ffc8aad26f4628844697499522 /workhorse/Makefile | |
parent | 8fea353b907d1fd571f5450a757cafee73cfbfd0 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'workhorse/Makefile')
-rw-r--r-- | workhorse/Makefile | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/workhorse/Makefile b/workhorse/Makefile index 6bd80a981bb..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: |