github.com/iotexproject/iotex-core@v1.14.1-rc1/go.test.sh (about) 1 #!/usr/bin/env bash 2 3 set -e 4 cat /dev/null > coverage.txt 5 6 for dir in $(go list -f '{{.ImportPath}}={{join .TestGoFiles ","}}' ./...);do 7 array=(${dir//=/ }) 8 if [ -n "${array[1]}" ]; then 9 go test -gcflags=all=-l -short -v -coverprofile=coverage.out -covermode=count "${array[0]}" 10 courtney -l=coverage.out -o=profile.out 11 if [ -f profile.out ]; then 12 cat profile.out >> coverage.txt 13 rm profile.out coverage.out 14 fi 15 fi 16 done