test: do not run integration tests by default
The ./test script will no longer run the integration tests. To run the integration test, set the INTEGRATION env var to a nonzero value. For example, `INTEGRATION=y ./test`.release-2.0
parent
6b304ce605
commit
d5f6b97b20
|
@ -8,4 +8,4 @@ install:
|
||||||
- go get code.google.com/p/go.tools/cmd/vet
|
- go get code.google.com/p/go.tools/cmd/vet
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- ./test
|
- INTEGRATION=y ./test
|
||||||
|
|
9
test
9
test
|
@ -15,8 +15,8 @@ COVER=${COVER:-"-cover"}
|
||||||
source ./build
|
source ./build
|
||||||
|
|
||||||
# Hack: gofmt ./ will recursively check the .git directory. So use *.go for gofmt.
|
# 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"
|
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/"
|
FORMATTABLE="$TESTABLE_AND_FORMATTABLE *.go etcdctl/ integration"
|
||||||
|
|
||||||
# user has not provided PKG override
|
# user has not provided PKG override
|
||||||
if [ -z "$PKG" ]; then
|
if [ -z "$PKG" ]; then
|
||||||
|
@ -41,6 +41,11 @@ TEST=${split[@]/#/${REPO_PATH}/}
|
||||||
echo "Running tests..."
|
echo "Running tests..."
|
||||||
go test -timeout 3m ${COVER} $@ ${TEST} --race
|
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..."
|
echo "Checking gofmt..."
|
||||||
fmtRes=$(gofmt -l $FMT)
|
fmtRes=$(gofmt -l $FMT)
|
||||||
if [ -n "${fmtRes}" ]; then
|
if [ -n "${fmtRes}" ]; then
|
||||||
|
|
Loading…
Reference in New Issue