Skip to content

Commit

Permalink
scripts/coverage.sh: ignore packages without test files
Browse files Browse the repository at this point in the history
We have vet and build check available, no need to repeat them here
  • Loading branch information
yousong committed Jun 16, 2020
1 parent e27a12e commit 200029d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ covermode=${COVERMODE:-atomic}
coverdir=$(mktemp -d /tmp/coverage.XXXXXXXXXX)
profile="${coverdir}/profile.out"
if [ -z "$pkgs" ]; then
pkgs="$(go list -mod vendor ./... | grep -vE 'host-image|hostimage')"
pkgs="$(go list -mod vendor -test ./... | grep '\.test$' | sed -e 's/\.test$//')"
pkgs="$(echo "$pkgs" | grep -vE 'host-image|hostimage')"
fi
if type circleci &>/dev/null; then
pkgs="$(echo "$pkgs" | circleci tests split)"
Expand Down

0 comments on commit 200029d

Please sign in to comment.