github.com/andrewrech/lazygit@v0.8.1/test.sh (about) 1 #!/usr/bin/env bash 2 3 set -e 4 echo "" > coverage.txt 5 6 use_go_test=false 7 if command -v gotest; then 8 use_go_test=true 9 fi 10 11 for d in $( find ./* -maxdepth 10 ! -path "./vendor*" ! -path "./.git*" ! -path "./scripts*" -type d); do 12 if ls $d/*.go &> /dev/null; then 13 args="-race -coverprofile=profile.out -covermode=atomic $d" 14 if [ "$use_go_test" == true ]; then 15 gotest $args 16 else 17 go test $args 18 fi 19 if [ -f profile.out ]; then 20 cat profile.out >> coverage.txt 21 rm profile.out 22 fi 23 fi 24 done