github.com/prysmaticlabs/prysm@v1.4.4/scripts/coverage.sh (about) 1 #!/usr/bin/env bash 2 3 declare -a skip_coverage=("github.com/prysmaticlabs/prysm/contracts/sharding-manager-contract" 4 "github.com/prysmaticlabs/prysm/contracts/validator-registration-contract") 5 6 set -e 7 echo "" > coverage.txt 8 9 for d in $(go list ./... | grep -v vendor); do 10 if [[ ${skip_coverage[*]} =~ $d ]]; then 11 continue 12 fi 13 go test -coverprofile=profile.out -covermode=atomic "$d" 14 if [ -f profile.out ]; then 15 cat profile.out >> coverage.txt 16 rm profile.out 17 fi 18 done