test: simplify CI tests

Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
This commit is contained in:
Gyuho Lee 2018-04-12 19:05:34 -07:00
parent c6ae68d3f7
commit 16487395e1
2 changed files with 12 additions and 15 deletions

View File

@ -17,5 +17,5 @@ package integration
import "github.com/coreos/pkg/capnslog"
func init() {
capnslog.SetGlobalLogLevel(capnslog.INFO)
capnslog.SetGlobalLogLevel(capnslog.CRITICAL)
}

25
test
View File

@ -69,16 +69,15 @@ fi
function unit_pass {
echo "Running unit tests..."
# only -run=Test so examples can run in integration tests
go test -timeout 3m ${COVER} ${RACE} -cpu 1,2,4 -run=Test $@ ${TEST}
go test -timeout 3m ${COVER} ${RACE} -cpu 4 -run=Test $@ ${TEST}
}
function integration_pass {
echo "Running integration tests..."
go test -timeout 15m -v -cpu 1,2,4 $@ ${REPO_PATH}/integration
go test -timeout 1m -v ${RACE} -cpu 1,2,4 $@ ${REPO_PATH}/client/integration
go test -timeout 10m -v ${RACE} -cpu 1,2,4 $@ ${REPO_PATH}/clientv3/integration
go test -timeout 1m -v -cpu 1,2,4 $@ ${REPO_PATH}/contrib/raftexample
go test -timeout 1m -v ${RACE} -cpu 1,2,4 -run=Example $@ ${TEST}
go test -timeout 15m -v -cpu 4 $@ ${REPO_PATH}/integration
go test -timeout 1m -v ${RACE} -cpu 4 $@ ${REPO_PATH}/client/integration
go test -timeout 10m -v ${RACE} -cpu 4 $@ ${REPO_PATH}/clientv3/integration
go test -timeout 1m -v ${RACE} -cpu 4 -run=Example $@ ${TEST}
}
function functional_pass {
@ -153,26 +152,24 @@ function cov_pass {
function e2e_pass {
echo "Running e2e tests..."
go test -timeout 10m -v -cpu 1,2,4 $@ ${REPO_PATH}/e2e
go test -timeout 10m -v -cpu 4 $@ ${REPO_PATH}/e2e
}
function integration_e2e_pass {
echo "Running integration and e2e tests..."
go test -timeout 10m -v -cpu 1,2,4 $@ ${REPO_PATH}/e2e &
go test -timeout 10m -v -cpu 4 $@ ${REPO_PATH}/e2e &
e2epid="$!"
go test -timeout 15m -v -cpu 1,2,4 $@ ${REPO_PATH}/integration &
go test -timeout 15m -v -cpu 4 $@ ${REPO_PATH}/integration &
intpid="$!"
wait $e2epid
wait $intpid
go test -timeout 1m -v ${RACE} -cpu 1,2,4 $@ ${REPO_PATH}/client/integration
go test -timeout 10m -v ${RACE} -cpu 1,2,4 $@ ${REPO_PATH}/clientv3/integration
go test -timeout 1m -v -cpu 1,2,4 $@ ${REPO_PATH}/contrib/raftexample
go test -timeout 1m -v ${RACE} -cpu 1,2,4 -run=Example $@ ${TEST}
go test -timeout 1m -v ${RACE} -cpu 4 $@ ${REPO_PATH}/client/integration
go test -timeout 10m -v ${RACE} -cpu 4 $@ ${REPO_PATH}/clientv3/integration
}
function grpcproxy_pass {
go test -timeout 15m -v ${RACE} -tags cluster_proxy -cpu 1,2,4 $@ ${REPO_PATH}/integration
go test -timeout 15m -v ${RACE} -tags cluster_proxy -cpu 4 $@ ${REPO_PATH}/integration
}
function release_pass {