go.test.sh 498 B

123456789101112131415161718192021222324
  1. #!/usr/bin/env bash
  2. set -e
  3. touch coverage.txt
  4. # test fuzz inputs
  5. go test -tags gofuzz -run TestFuzz -v .
  6. # quick-test without -race
  7. go test ./...
  8. # test with "debug" tag
  9. go test -tags debug ./...
  10. # test concurrency
  11. go test -race -cpu=1,2,4 -run TestClient_DoConcurrent
  12. for d in $(go list ./... | grep -v vendor); do
  13. go test -race -coverprofile=profile.out -covermode=atomic "$d"
  14. if [[ -f profile.out ]]; then
  15. cat profile.out >> coverage.txt
  16. rm profile.out
  17. fi
  18. done