-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Simplify test coverage scripts #797
Comments
I did a test run, |
Another alternative by @bogdandrutu (open-telemetry/opentelemetry-collector#671 (comment)) is to use https://github.com/ory/go-acc, which also allows cross-package coverage to be included. |
shall I use go-acc and add make task ? or is someone else working on this ? |
This is the output of go-acc command i just ran on the repo: ok github.com/jaegertracing/jaeger 0.011s coverage: [no statements] [no tests to run] |
I don't think go-acc is going to be particularly useful, since it doesn't allow any more customizability than plain We want to exclude all auto-generated packages (see ALL_SRC in Makefile), and packages with |
But then if we just use go test -cover ./... we would still need script to take the output and check if it meets threshold. |
Threshold is checked when the results are submitted to codecov.io |
Okay. Help me understand one more thing. Regarding the auto-generated packages that you referred earlier. Do we know what is the list of those auto-generated packages beforehand ? In that case we can simply do something like : |
I don't think generated packages are going to be a problem for code coverage, because they do not include any _test files, which makes
(but we do exclude them from linters) |
wanted to do a sanity before pushing. |
CONTRIBUTING.md should describe the required setup steps. Please post the error. |
While running test . This one fails === RUN TestPanicFunc |
yeah, this test is know to be unstable, there's an open ticket for it #1314. If you rerun the tests it usually passes. |
We moved to Go 1.10 in #792, in which
go test
coverpkg has been enhanced to accept multiple packages.This means that we can simplify the logic in cover.sh and potentially make the build faster.
The text was updated successfully, but these errors were encountered: