Official cwtch.im peer and server implementations. https://cwtch.im
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

tests.sh 1.3KB

123456789101112131415161718192021222324
  1. #!/bin/bash
  2. set -e
  3. pwd
  4. GORACE="haltonerror=1"
  5. go test -race ${1} -coverprofile=model.cover.out -v ./model
  6. go test -race ${1} -coverprofile=event.cover.out -v ./event
  7. go test -race ${1} -coverprofile=storage.v0.cover.out -v ./storage/v0
  8. go test -race ${1} -coverprofile=storage.v1.cover.out -v ./storage/v1
  9. go test -race ${1} -coverprofile=storage.cover.out -v ./storage
  10. go test -race ${1} -coverprofile=peer.connections.cover.out -v ./protocol/connections
  11. go test -race ${1} -coverprofile=protocol.spam.cover.out -v ./protocol/connections/spam
  12. go test -race ${1} -coverprofile=peer.fetch.cover.out -v ./protocol/connections/fetch
  13. go test -race ${1} -coverprofile=peer.listen.cover.out -v ./protocol/connections/listen
  14. go test -race ${1} -coverprofile=peer.send.cover.out -v ./protocol/connections/send
  15. go test -race ${1} -coverprofile=peer.cover.out -v ./peer
  16. go test -race ${1} -coverprofile=server.fetch.cover.out -v ./server/fetch
  17. go test -race ${1} -coverprofile=server.listen.cover.out -v ./server/listen
  18. go test -race ${1} -coverprofile=server.send.cover.out -v ./server/send
  19. go test -race ${1} -coverprofile=server.metrics.cover.out -v ./server/metrics
  20. go test -race ${1} -coverprofile=server.cover.out -v ./server
  21. echo "mode: set" > coverage.out && cat *.cover.out | grep -v mode: | sort -r | \
  22. awk '{if($1 != last) {print $0;last=$1}}' >> coverage.out
  23. rm -rf *.cover.out