go.test.sh 273 B

123456789101112
  1. #!/usr/bin/env bash
  2. set -e
  3. echo "" > coverage.txt
  4. for d in $(go list ./... | grep -v vendor); do
  5. go test -race -coverprofile=profile.out -covermode=atomic "$d"
  6. if [ -f profile.out ]; then
  7. cat profile.out >> coverage.txt
  8. rm profile.out
  9. fi
  10. done