Merge pull request #2135 from bcwaldon/test-int

test: do not run integration tests by default
release-2.0
Brian Waldon 2015-01-23 11:44:46 -08:00
commit 93e4880ae6
2 changed files with 8 additions and 3 deletions

View File

@ -8,4 +8,4 @@ install:
- go get code.google.com/p/go.tools/cmd/vet
script:
- ./test
- INTEGRATION=y ./test

9
test
View File

@ -15,8 +15,8 @@ COVER=${COVER:-"-cover"}
source ./build
# Hack: gofmt ./ will recursively check the .git directory. So use *.go for gofmt.
TESTABLE_AND_FORMATTABLE="client discovery error etcdctl/command etcdmain etcdserver etcdserver/etcdhttp etcdserver/etcdhttp/httptypes integration migrate pkg/fileutil pkg/flags pkg/idutil pkg/ioutil pkg/netutil pkg/pbutil pkg/types pkg/transport pkg/wait proxy raft rafthttp snap store wal"
FORMATTABLE="$TESTABLE_AND_FORMATTABLE *.go etcdctl/"
TESTABLE_AND_FORMATTABLE="client discovery error etcdctl/command etcdmain etcdserver etcdserver/etcdhttp etcdserver/etcdhttp/httptypes migrate pkg/fileutil pkg/flags pkg/idutil pkg/ioutil pkg/netutil pkg/pbutil pkg/types pkg/transport pkg/wait proxy raft rafthttp snap store wal"
FORMATTABLE="$TESTABLE_AND_FORMATTABLE *.go etcdctl/ integration"
# user has not provided PKG override
if [ -z "$PKG" ]; then
@ -41,6 +41,11 @@ TEST=${split[@]/#/${REPO_PATH}/}
echo "Running tests..."
go test -timeout 3m ${COVER} $@ ${TEST} --race
if [ -n "$INTEGRATION" ]; then
echo "Running integration tests..."
go test -timeout 3m $@ ${REPO_PATH}/integration
fi
echo "Checking gofmt..."
fmtRes=$(gofmt -l $FMT)
if [ -n "${fmtRes}" ]; then