Skip to content

Commit 868b59c

Browse files
committed
chore: add back go-junit-report tool install
1 parent 289a244 commit 868b59c

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

.pipelines/templates/run-unit-tests.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,15 @@ stages:
1515
set -e
1616
make bpf-lib
1717
go generate ./...
18+
make go-junit-report
1819
1920
# run test, echo exit status code to fd 3, pipe output from test to tee, which splits output to stdout and go-junit-report (which converts test output to report.xml),
2021
# stdout from tee is redirected to fd 4. Take output written to fd 3 (which is the exit code of test), redirect to stdout, pipe to read from stdout then exit with that status code.
2122
# Read all output from fd 4 (output from tee) and write to top stdout
2223
{ { { {
2324
sudo -E env "PATH=$PATH" make test-all;
2425
echo $? >&3;
25-
} | tee >(go tool -modfile=tools.go.mod go-junit-report > report.xml) >&4;
26+
} | tee >($(go env GOPATH)/bin/go-junit-report > report.xml) >&4;
2627
} 3>&1;
2728
} | { read xs; exit $xs; }
2829
} 4>&1

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -989,11 +989,13 @@ setup: tools install-hooks gitconfig ## performs common required repo setup
989989

990990
##@ Tools
991991

992-
tools: renderkit
992+
tools: renderkit go-junit-report
993993

994994
renderkit: ## Install renderkit for rendering Dockerfile templates
995995
@go install -modfile=$(TOOLS_GO_MOD) github.com/orellazri/renderkit
996996

997+
go-junit-report: ## Install go-junit-report for converting test results to JUnit XML format
998+
@go install -modfile=$(TOOLS_GO_MOD) github.com/jstemmer/go-junit-report
997999

9981000
##@ Help
9991001

0 commit comments

Comments
 (0)