github.com/cvmfs/docker-graphdriver@v0.0.0-20181206110523-155ec6df0521/ci/test/unit.sh (about)

     1  #!/bin/bash
     2  REPO_NAME="docker-graphdriver"
     3  REPO="github.com/cvmfs/$REPO_NAME"
     4  WORKSPACE="/tmp/workspace/$REPO_NAME"
     5  GOPATH="$WORKSPACE/cache/gopath"
     6  
     7  SRC="plugins"
     8  DST="$GOPATH/src/$REPO/plugins"
     9  
    10  mkdir -p "$DST" > /dev/null
    11  cp -r "$SRC"/* "$DST"
    12  
    13  go get  "$REPO/plugins/..."
    14  go test "$REPO/plugins/..."
    15  
    16  status=$?
    17  
    18  if [ "$status" == "0" ]; then
    19      echo "Unit tests passed"
    20      exit 0
    21  else
    22      echo "Unit tests failed!"
    23      exit -1
    24  fi