-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Add test-coverage & codecov target and update circleci #109
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,3 +2,5 @@ | |
| /build/ | ||
| cli/winresources/rsrc_386.syso | ||
| cli/winresources/rsrc_amd64.syso | ||
| coverage.txt | ||
| profile.out | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| #!/usr/bin/env bash | ||
| set -eu -o pipefail | ||
|
|
||
| go test -tags daemon -v $@ | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| #!/usr/bin/env bash | ||
| set -eu -o pipefail | ||
|
|
||
| for pkg in $(go list ./... | grep -v /vendor/); do | ||
| ./scripts/test/unit \ | ||
| -cover \ | ||
| -coverprofile=profile.out \ | ||
| -covermode=atomic \ | ||
| ${pkg} | ||
|
|
||
| if test -f profile.out; then | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please include a comment as to why this required.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please address this. Why is this not an argument to the original command?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is "this"? The
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The file is given as one argument, then copied to the other. Why not give the original file to the command and have it write directly? Are you trying to append it to a global coverage file?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The file isn't copied. The file is appended to the global coverage file yes. That's what it's doing. |
||
| cat profile.out >> coverage.txt | ||
| rm profile.out | ||
| fi | ||
| done | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why aren't these just in the Makefile? These kinds of systems are extremely hard to maintain.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are "these kinds of systems" ? And what makes them hard to maintain?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A mess of bash scripts. It contributes to a horrid build experience and is very hard to modify.
This particular example is absurd. Why is this in its own file?