github.com/cloudfoundry-incubator/windows-utilities-tests@v0.11.1-0.20230315194243-a2ce46b74d8a/bin/run.sh (about) 1 #!/bin/bash 2 3 export ROOTPATH="$PWD" 4 export GOPATH="$ROOTPATH/stemcell-builder" 5 export PATH="$PATH:$GOPATH/bin" 6 7 if [ -z "$GOPATH" ]; then 8 echo "GOPATH not set" 9 exit 1 10 fi 11 12 # Install ginkgo if it does not exist 13 if ! which ginkgo 2>&1 > /dev/null; then 14 pushd "$PWD/vendor/github.com/onsi/ginkgo/ginkgo" 15 if [ ! -d "$GOPATH/bin"]; then 16 mkdir "$GOPATH/bin" 17 fi 18 go build -o "$GOPATH/bin/ginkgo" 19 popd 20 fi 21 22 if ! which ginkgo 2>&1 > /dev/null; then 23 echo "Install failed to find ginkgo on PATH" 24 exit 1 25 fi 26 27 ginkgo -r -v "$GOPATH/src/github.com/cloudfoundry-incubator/windows-utilities-tests" 28 GINKGO_EXIT=$? 29 30 # Kill any ssh tunnels left by our IAAS specific setup 31 TUNNEL_PID=$(ps -C ssh -o pid=) 32 if [ -n "$TUNNEL_PID" ]; then 33 kill -2 $TUNNEL_PID 34 fi 35 36 exit $GINKGO_EXIT