test 353 B

123456789101112131415
  1. #!/bin/bash
  2. # help: Run go unit tests
  3. set -ex
  4. cd $(dirname $0)/..
  5. echo Running tests
  6. PACKAGES=". $(find -name '*.go' | xargs -I{} dirname {} | cut -f2 -d/ | sort -u | grep -Ev '(^\.$|.git|.trash-cache|vendor|bin)' | sed -e 's!^!./!' -e 's!$!/...!')"
  7. if [ "$ARCH" = "amd64" ]; then
  8. RACE="-race"
  9. fi
  10. go test $RACE -v -cover -tags=test ${PACKAGES}