-
Notifications
You must be signed in to change notification settings - Fork 176
Add coverage target in Makefile for coverage reporting #71
Changes from all commits
6cb629a
eff17e7
eb11e4e
550fd77
d1c85c2
a9d5881
c04818c
4136efb
abdac4c
9aad848
8095120
d4ddc16
e7d1ee8
b205e55
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// +build testrunmain | ||
|
||
package main | ||
|
||
import "testing" | ||
|
||
func TestRunMain(t *testing.T) { | ||
main() | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash | ||
|
||
# This script is a proxy that injects the required test flags and strips out test output | ||
# It allows us to use a coverage-enabled binary for e2e tests | ||
|
||
BUILD_DIR=${BASH_SOURCE%/*}/../_build | ||
|
||
$BUILD_DIR/docker-app.cov \ | ||
-test.coverprofile=$BUILD_DIR/cov/$(uuidgen).out \ | ||
"$@" \ | ||
| grep -vE '^PASS$' \ | ||
| grep -vE '^coverage: [0-9]+\.[0-9]+% of statements in .+$' \ | ||
| grep -v '^=== RUN TestRunMain$' | ||
|
||
exit ${PIPESTATUS[0]} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
would be good to upstream your changes here so that we don't need to rely on a fork
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.
PR submitted: spf13/pflag#169
I'll keep an eye on it and update if anything happens.