diff --git a/scripts/coverage.sh b/scripts/coverage.sh index 777c455..422f37d 100755 --- a/scripts/coverage.sh +++ b/scripts/coverage.sh @@ -8,7 +8,12 @@ set -e for d in $(find ./* -maxdepth 10 -type d); do if ls $d/*.go &> /dev/null; then - go test -covermode=atomic $d + go test -coverprofile=profile.out -covermode=atomic $d + if [ -f profile.out ]; then + echo "$(pwd)" + cat profile.out | grep -v "mode: " >> coverage.txt + rm profile.out + fi fi done