Last active
February 22, 2017 17:39
-
-
Save tobbbles/a35ee9b9dbaebcf17d8670f3688e602c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| workdir=.cover | |
| profile="coverage.out" | |
| mode=count | |
| rm -rf "$workdir" | |
| mkdir "$workdir" | |
| for pkg in $(go list ./... | grep -v vendor/); do | |
| f="$workdir/$(echo $pkg | tr / -).cover" | |
| go test -covermode="$mode" -coverprofile="$f" "$pkg" | |
| done | |
| echo "mode: $mode" >"$profile" | |
| grep -h -v "^mode:" "$workdir"/*.cover >>"$profile" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment