github.com/jpetazzo/etcd@v0.2.1-0.20140113055439-97f1363afac5/test.sh (about)

     1  #!/bin/sh
     2  set -e
     3  
     4  if [ -z "$PKG" ]; then
     5      PKG="./store ./server ./server/v2/tests ./mod/lock/v2/tests"
     6  fi
     7  
     8  if [ -z "$RUN" ]; then
     9      RUN="."
    10  fi
    11  
    12  # Get GOPATH, etc from build
    13  . ./build
    14  
    15  # use right GOPATH
    16  export GOPATH="${PWD}"
    17  
    18  # Unit tests
    19  for i in $PKG
    20  do
    21      go test -i $i
    22      go test -v -test.run=$RUN $i
    23  done
    24  
    25  # Functional tests
    26  go test -i ./tests/functional
    27  ETCD_BIN_PATH=$(pwd)/etcd go test -v  -test.run=$RUN ./tests/functional