Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unit tests on tip fail when uploading test report #5043

Closed
yurishkuro opened this issue Dec 26, 2023 · 0 comments · Fixed by #5044
Closed

Unit tests on tip fail when uploading test report #5043

yurishkuro opened this issue Dec 26, 2023 · 0 comments · Fixed by #5044
Assignees
Labels

Comments

@yurishkuro
Copy link
Member

https://github.com/jaegertracing/jaeger/actions/runs/7330978812/job/19962951731

The tool is being installed, although strangely it lists both v1 and v2

go install github.com/jstemmer/go-junit-report/v2@latest
go: downloading github.com/jstemmer/go-junit-report/v2 v2.1.0
go: downloading github.com/jstemmer/go-junit-report v1.0.0

but then it fails saying command not found

go tool cover -html=cover.out -o cover.html
cat test-results.json | go-junit-report -parser gojson > junit-report.xml
/bin/bash: line 1: go-junit-report: command not found
cat: write error: Broken pipe
make: *** [Makefile:465: test-report] Error 127

cc @albertteoh

@yurishkuro yurishkuro added the bug label Dec 26, 2023
yurishkuro pushed a commit that referenced this issue Dec 26, 2023
## Which problem is this PR solving?
- Resolves #5043

## Description of the changes
- `go-junit-report` was getting installed successfully into the default
`$GOPATH` (`$HOME/go/bin`) but the GOPATH wasn't in the `$PATH`
environment variable, which is what caused the `go-junit-report: command
not found` error.
- It worked for the normal (non-go-tip) unit tests because the `$GOPATH`
was already set and inserted into `$PATH`.
- This explicitly sets the `$GOPATH` and inserts it into `$PATH` prior
to installing test tools.

## How was this change tested?
- Tested in [my own
fork](https://github.com/albertteoh/jaeger/actions/runs/7332463204/job/19966641893)
with some debug logging in the Makefile.

## Checklist
- [x] I have read
https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md
- [x] I have signed all commits

---------

Signed-off-by: Albert Teoh <albert@packsmith.io>
Co-authored-by: Albert Teoh <albert@packsmith.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants