test-global-coverage.sh 421 B

123456789101112131415
  1. #!/usr/bin/env bash
  2. set -e
  3. echo "" > coverage.txt
  4. for d in $(find ./* -maxdepth 10 -type d -not -path "./build" -not -path "./Godeps/*" ); do
  5. if ls $d/*.go &> /dev/null; then
  6. go test -coverprofile=profile.out -covermode=atomic $d
  7. if [ -f profile.out ]; then
  8. cat profile.out >> coverage.txt
  9. echo '<<<<<< EOF' >> coverage.txt
  10. rm profile.out
  11. fi
  12. fi
  13. done