설명 없음

test.sh 357B

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