scripts/coverage.sh: ignore packages without test files

We have vet and build check available, no need to repeat them here
This commit is contained in:
Yousong Zhou
2020-06-16 10:02:08 +08:00
parent e27a12ec61
commit 200029dfd2

View File

@@ -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)"