Skip to content

Commit

Permalink
add comment to tool/cover.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
Songmu committed Jan 11, 2015
1 parent b6c4d94 commit d4b6ce6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tool/cover.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#/bin/sh
# Calculate coverage
# run this and you can see coverage reports as following
# % go tool cover -html .profile.cov

set -e

prof=${1:-".profile.cov"}
Expand All @@ -12,6 +16,8 @@ cleanup() {
}
trap cleanup INT QUIT TERM EXIT

# cmd/cover doesn't support -coverprofile for multiple packages, so run tests in each dir.
# ref. https://github.com/mattn/goveralls/issues/20
for dir in $(find . -not -path '*/[._]*' -type d); do
if ls $dir/*.go > /dev/null 2>&1; then
tmpprof=$dir/profile.tmp
Expand Down

0 comments on commit d4b6ce6

Please sign in to comment.