github.com/huaweicloud/golangsdk@v0.0.0-20210831081626-d823fe11ceba/script/coverage (about) 1 #!/bin/bash 2 3 set -e 4 5 n=1 6 for testpkg in $(go list ./testing ./.../testing); do 7 covpkg="${testpkg/"/testing"/}" 8 go test -covermode count -coverprofile "testing_"$n.coverprofile -coverpkg $covpkg $testpkg 2>/dev/null 9 n=$((n+1)) 10 done 11 gocovmerge `ls *.coverprofile` > cover.out 12 rm *.coverprofile