github.com/jghiloni/cli@v6.28.1-0.20170628223758-0ce05fe032a2+incompatible/bin/test (about) 1 #!/bin/bash 2 3 set -e 4 5 function printStatus { 6 if [ $? -eq 0 ]; then 7 echo -e "\nSWEET SUITE SUCCESS" 8 else 9 echo -e "\nSUITE FAILURE" 10 fi 11 } 12 13 trap printStatus EXIT 14 15 go version 16 17 bin/i18n-checkup 18 19 echo -e "\n Cleaning build artifacts..." 20 21 # Clean up old plugin binaries used in test 22 23 rm -f fixtures/plugins/*.exe 24 rm -f plugin_examples/*.exe 25 26 export LC_ALL="en_US.UTF-8" 27 28 if [ ! $(which ginkgo) ];then 29 echo -e "\n Building ginkgo..." 30 pushd vendor/github.com/onsi/ginkgo/ginkgo 31 go install 32 popd 33 fi 34 35 echo -e "\n Formatting packages..." 36 go fmt ./... 37 38 echo -e "\n Vetting packages for potential issues..." 39 go tool vet cf/. 40 for file in $(find {actor,command,cf,plugin,util} \( -name "*.go" -not -iname "*test.go" \)) 41 do 42 go tool vet -all -shadow=true $file 43 done 44 45 ginkgo version 46 47 CF_HOME=$(pwd)/fixtures ginkgo -r -randomizeAllSpecs -randomizeSuites -skipPackage integration $@ 48 49 echo -e "\n Running build script to confirm everything compiles..." 50 bin/build