github.com/jasonkeene/cli@v6.14.1-0.20160816203908-ca5715166dfb+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  bin/i18n-checkup
    16  
    17  echo -e "\n Cleaning build artifacts..."
    18  
    19  # Clean up old plugin binaries used in test
    20  
    21  rm -f fixtures/plugins/*.exe
    22  rm -f plugin_examples/*.exe
    23  
    24  export LC_ALL="en_US.UTF-8"
    25  
    26  if [ ! $(which ginkgo) ];then
    27    echo -e "\n Installing ginkgo..."
    28    go get github.com/onsi/ginkgo/ginkgo
    29  fi
    30  
    31  echo -e "\n Formatting packages..."
    32  go fmt ./...
    33  
    34  echo -e "\n Vetting packages for potential issues..."
    35  go tool vet cf/.
    36  for file in $(find {cf,plugin,testhelpers,utils} \( -name "*.go" -not -iname "*test.go" \))
    37  do
    38    go tool vet -all -shadow=true $file
    39  done
    40  
    41  CF_HOME=$(pwd)/fixtures ginkgo -r -randomizeAllSpecs -randomizeSuites $@
    42  
    43  echo -e "\n Running build script to confirm everything compiles..."
    44  bin/build