test 355 B

123456789101112131415
  1. #!/bin/bash
  2. # help: Run go unit tests
  3. set -e
  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|tests)' | sed -e 's!^!./!' -e 's!$!/...!')"
  7. if [ "$ARCH" = "amd64" ]; then
  8. RACE="-race"
  9. fi
  10. go test $RACE -cover -tags=test ${PACKAGES}