diff options
author | Sami Hiltunen <shiltunen@gitlab.com> | 2020-04-02 13:10:28 +0300 |
---|---|---|
committer | Sami Hiltunen <shiltunen@gitlab.com> | 2020-04-02 13:10:28 +0300 |
commit | b594443c634101551d2aebe79e4c3fc222177502 (patch) | |
tree | 71604b428ae057e0447d840f96b92b90ccad435c /_support/Makefile.template | |
parent | 45ed32c5c0836ab104f94fa6c886eb5b8b203b22 (diff) | |
parent | 8ce07c1d3a05a837bc873a67f7d11b35a04dff62 (diff) |
Merge branch 'po-junit-reports' into 'master'
Add JUnit style test reports
See merge request gitlab-org/gitaly!2005
Diffstat (limited to '_support/Makefile.template')
-rw-r--r-- | _support/Makefile.template | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/_support/Makefile.template b/_support/Makefile.template index 60f334e0e..7bbf2d4c1 100644 --- a/_support/Makefile.template +++ b/_support/Makefile.template @@ -122,8 +122,8 @@ prepare-tests: {{ .GitlabShellDir }}/config.yml {{ .TestRepo }} {{ .GitTestRepo test: test-go rspec rspec-gitlab-shell .PHONY: test-go -test-go: prepare-tests - @cd {{ .SourceDir }} && go test -tags "$(BUILD_TAGS)" -count=1 {{ join .AllPackages " " }} # count=1 bypasses go 1.10 test caching +test-go: prepare-tests {{ .GoJunitReport }} + @cd {{ .SourceDir }} && go test -v -tags "$(BUILD_TAGS)" -count=1 {{ join .AllPackages " " }} 2>&1 | {{ .GoJunitReport }} > report-${CI_JOB_NAME}.xml .PHONY: test-with-proxies test-with-proxies: prepare-tests @@ -137,8 +137,8 @@ test-with-praefect: build prepare-tests GITALY_TEST_PRAEFECT_BIN={{ .BuildDir }}/bin/praefect go test -tags "$(BUILD_TAGS)" -count=1 {{ join .AllPackages " " }} # count=1 bypasses go 1.10 test caching .PHONY: race-go -race-go: prepare-tests - @cd {{ .SourceDir }} && go test -tags "$(BUILD_TAGS)" -race {{ join .AllPackages " " }} +race-go: prepare-tests {{ .GoJunitReport }} + @cd {{ .SourceDir }} && go test -v -tags "$(BUILD_TAGS)" -race {{ join .AllPackages " " }} 2>&1 | {{ .GoJunitReport }} > report-${CI_JOB_NAME}.xml .PHONY: rspec rspec: assemble-go prepare-tests @@ -178,6 +178,9 @@ check-formatting: {{ .GitalyFmt }} {{ .GoImports }}: {{ .MakegenDep }} go get golang.org/x/tools/cmd/goimports@2538eef75904eff384a2551359968e40c207d9d2 +{{ .GoJunitReport }}: {{ .MakegenDep }} + go get github.com/jstemmer/go-junit-report@984a47ca6b0a7d704c4b589852051b4d7865aa17 + .PHONY: {{ .GitalyFmt }} {{ .GitalyFmt }}: @cd {{ .SourceDir }} && go build -o $@ ./internal/cmd/gitalyfmt |