github.com/asifdxtreme/cli@v6.1.3-0.20150123051144-9ead8700b4ae+incompatible/bin/test (about) 1 #!/bin/bash 2 3 ( 4 set -e 5 6 function printStatus { 7 if [ $? -eq 0 ]; then 8 echo -e "\nSWEET SUITE SUCCESS" 9 else 10 echo -e "\nSUITE FAILURE" 11 fi 12 } 13 14 trap printStatus EXIT 15 16 bin/generate-language-resources 17 18 echo -e "\n Running gi18n checkup..." 19 bin/gi18n-checkup 20 21 go get github.com/tools/godep 22 23 GODEP=$(which godep) 24 25 echo -e "\n Cleaning build artifacts..." 26 27 # Clean up old plugin binaries used in test 28 29 rm -f fixtures/plugins/*.exe 30 rm -f plugin_examples/*.exe 31 32 # Clean up old .a files in GOPATH 33 # It seems like `go clean` should do this but ... not so much 34 if [[ -d $GOPATH/pkg ]] ; then 35 pushd $GOPATH/pkg 36 rm -Rf * 37 popd 38 fi 39 40 if [[ -d $($GODEP path)/pkg ]] ; then 41 pushd $($GODEP path)/pkg 42 rm -Rf * 43 popd 44 fi 45 46 export LC_ALL="en_US.UTF-8" 47 export GOPATH=$($GODEP path):$GOPATH 48 export PATH=$($GODEP path)/bin:$PATH 49 go install github.com/onsi/ginkgo/ginkgo 50 51 echo -e "\n Formatting packages..." 52 go fmt ./... 53 54 echo -e "\n Testing packages..." 55 CF_HOME=$(pwd)/fixtures ginkgo -r $@ 56 57 echo -e "\n Vetting packages for potential issues..." 58 go tool vet cf/. 59 for file in $(find {cf,fileutils,generic,glob,main,testhelpers,words} \( -name "*.go" -not -iname "*test.go" \)) 60 do 61 go tool vet -all -shadow=true $file 62 done 63 64 echo -e "\n Running build script to confirm everything compiles..." 65 bin/build 66 )