github.com/rancher/types@v0.0.0-20220328215343-4370ff10ecd5/scripts/test (about) 1 #!/bin/bash 2 set -e 3 4 cd $(dirname $0)/.. 5 6 echo Running tests 7 8 PACKAGES=". $(find -name '*.go' | xargs -I{} dirname {} | cut -f2 -d/ | sort -u | grep -Ev '(^\.$|.git|.trash-cache|vendor|bin)' | sed -e 's!^!./!' -e 's!$!/...!')" 9 10 go test -cover -tags=test ${PACKAGES} 11 12 go generate 13 if [ -n "$(git status --porcelain --untracked-files=no)" ]; then 14 git status 15 echo git out of sync with generated code 16 exit 1 17 fi