github.com/robstrong/etcd@v0.4.4-0.20140620001034-fb32a999a6bb/test.sh (about)

     1  #!/bin/sh -e
     2  
     3  . ./build
     4  
     5  go test -i ./etcd
     6  go test -v ./etcd -race
     7  
     8  go test -i ./http
     9  go test -v ./http -race
    10  
    11  go test -i ./store
    12  go test -v ./store -race
    13  
    14  go test -i ./server
    15  go test -v ./server -race
    16  
    17  go test -i ./config
    18  go test -v ./config -race
    19  
    20  go test -i ./server/v1/tests
    21  go test -v ./server/v1/tests -race
    22  
    23  go test -i ./server/v2/tests
    24  go test -v ./server/v2/tests -race
    25  
    26  # Mod is deprecated temporarily.
    27  # go test -i ./mod/lock/v2/tests
    28  # go test -v ./mod/lock/v2/tests
    29  
    30  go test -i ./pkg/btrfs
    31  go test -v ./pkg/btrfs
    32  
    33  go test -i ./tests/functional
    34  ETCD_BIN_PATH=$(pwd)/bin/etcd go test -v ./tests/functional -race
    35  
    36  fmtRes=`gofmt -l $GOFMTPATH`
    37  if [ "$fmtRes" != "" ]; then
    38  	echo "Failed to pass golang format checking."
    39  	echo "Please gofmt modified go files, or run './build --fmt'."
    40  	exit 1
    41  fi