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.

19 lines
526 B

7 years ago
7 years ago
  1. #!/usr/bin/env bash
  2. set -e
  3. echo "" > coverage.txt
  4. echo "==> Running unit tests"
  5. for d in $(go list ./... | grep -v vendor); do
  6. go test -race -coverprofile=profile.out -covermode=atomic "$d"
  7. if [ -f profile.out ]; then
  8. cat profile.out >> coverage.txt
  9. rm profile.out
  10. fi
  11. done
  12. echo "==> Running integration tests (./tests)"
  13. find . -path ./vendor -prune -o -name "*.sock" -exec rm {} \;
  14. # tests/test.sh requires that we run the installed cmds, must not be out of date
  15. make install
  16. bash tests/test.sh