From 778c290a0eed19a4203c167915d42a223ebc7c5e Mon Sep 17 00:00:00 2001 From: Jaime Martinez Date: Tue, 27 Jul 2021 11:32:36 +1000 Subject: ci: use gotestsum for running tests Changelog: other --- Makefile.util.mk | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'Makefile.util.mk') diff --git a/Makefile.util.mk b/Makefile.util.mk index 3d803945..692848c7 100644 --- a/Makefile.util.mk +++ b/Makefile.util.mk @@ -11,15 +11,15 @@ lint: .GOPATH/.ok bin/golangci-lint format: .GOPATH/.ok bin/golangci-lint $Q ./bin/golangci-lint run ./... --fix --out-format $(OUT_FORMAT) $(LINT_FLAGS) | tee ${REPORT_FILE} -test: .GOPATH/.ok gitlab-pages +test: .GOPATH/.ok .GOPATH/.ok bin/gotestsum gitlab-pages rm -f tests.out - go test $(if $V,-v) ./... ${ARGS} 2>&1 | tee tests.out + ./bin/gotestsum --junitfile junit-test-report.xml --format testname -- ./... ${ARGS} -race: .GOPATH/.ok gitlab-pages - CGO_ENABLED=1 go test -race $(if $V,-v) $(allpackages) 2>&1 | tee tests.out +race: .GOPATH/.ok .GOPATH/.ok bin/gotestsum gitlab-pages + CGO_ENABLED=1 ./bin/gotestsum --junitfile junit-test-report.xml --format testname -- -race $(if $V,-v) $(allpackages) ${ARGS} -acceptance: .GOPATH/.ok gitlab-pages - go test $(if $V,-v) ./test/acceptance ${ARGS} 2>&1 | tee tests.out +acceptance: .GOPATH/.ok .GOPATH/.ok bin/gotestsum gitlab-pages + ./bin/gotestsum --junitfile junit-test-report.xml --format testname -- $(if $V,-v) ./test/acceptance ${ARGS} bench: .GOPATH/.ok gitlab-pages go test -bench=. -run=^$$ $(allpackages) @@ -52,8 +52,8 @@ deps-check: .GOPATH/.ok deps-download: .GOPATH/.ok go mod download -junit-report: .GOPATH/.ok bin/go-junit-report - cat tests.out | ./bin/go-junit-report -set-exit-code > junit-test-report.xml +junit-report: .GOPATH/.ok bin/gotestsum + ./bin/gotestsum --junitfile junit-test-report.xml --format testname changelog: TOKEN='$(GITLAB_PRIVATE_TOKEN)' VERSION='$(shell cat VERSION)' BRANCH='$(BRANCH)' bash ./.gitlab/scripts/changelog.sh -- cgit v1.2.3