|
|
@@ -134,7 +134,7 @@ function unit_pass {
|
|
|
else
|
|
|
USERTIMEOUT="${TIMEOUT}"
|
|
|
fi
|
|
|
- go test ${GO_TEST_FLAG} -timeout "${USERTIMEOUT}" "${COVER}" ${RACE} -cpu 1,2,4 ${RUN_ARG} "$@" "${TEST[@]}"
|
|
|
+ go test ${GO_TEST_FLAG} -timeout "${USERTIMEOUT}" "${COVER}" ${RACE} -cpu 4 ${RUN_ARG} "$@" "${TEST[@]}"
|
|
|
}
|
|
|
|
|
|
function integration_pass {
|
|
|
@@ -154,33 +154,29 @@ function integration_pass {
|
|
|
# if TESTCASE not set, PKG set, run all test cases in specified package
|
|
|
# if TESTCASE not set, PKG not set, run all tests in all integration and integration_extra packages
|
|
|
if [ -z "${TESTCASE}" ] && [ -z "${USERPKG}" ]; then
|
|
|
- go test -timeout "${USERTIMEOUT}" -v -cpu 1,2,4 "$@" "${REPO_PATH}/integration"
|
|
|
+ go test -timeout "${USERTIMEOUT}" -v -cpu 4 "$@" "${REPO_PATH}/integration"
|
|
|
integration_extra "$@"
|
|
|
else
|
|
|
if [ -z "${USERPKG}" ]; then
|
|
|
INTEGTESTPKG=("${REPO_PATH}/integration"
|
|
|
"${REPO_PATH}/client/integration"
|
|
|
"${REPO_PATH}/clientv3/integration"
|
|
|
- "${REPO_PATH}/contrib/raftexample"
|
|
|
"${REPO_PATH}/store")
|
|
|
else
|
|
|
INTEGTESTPKG=("${TEST[@]}")
|
|
|
fi
|
|
|
- go test -timeout "${USERTIMEOUT}" -v -cpu 1,2,4 "${RUN_ARG}" "$@" "${INTEGTESTPKG[@]}"
|
|
|
+ go test -timeout "${USERTIMEOUT}" -v -cpu 4 "${RUN_ARG}" "$@" "${INTEGTESTPKG[@]}"
|
|
|
fi
|
|
|
}
|
|
|
|
|
|
function integration_extra {
|
|
|
- go test -timeout 1m -v ${RACE} -cpu 1,2,4 "$@" "${REPO_PATH}/client/integration"
|
|
|
- go test -timeout 25m -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 5m -v ${RACE} -tags v2v3 "$@" "${REPO_PATH}/etcdserver/v2store"
|
|
|
- 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 25m -v ${RACE} -cpu 4 "$@" "${REPO_PATH}/clientv3/integration"
|
|
|
}
|
|
|
|
|
|
function functional_pass {
|
|
|
# Clean up any data and logs from previous runs
|
|
|
- rm -rf /tmp/etcd-agent-data-*
|
|
|
+ rm -rf /tmp/etcd-functional-* /tmp/etcd-functional-*.backup
|
|
|
|
|
|
for a in 1 2 3; do
|
|
|
./bin/etcd-agent --network tcp --address 127.0.0.1:${a}9027 &
|
|
|
@@ -296,15 +292,15 @@ function e2e_pass {
|
|
|
USERTIMEOUT="${TIMEOUT}"
|
|
|
fi
|
|
|
|
|
|
- go test -timeout "${USERTIMEOUT}" -v -cpu 1,2,4 "${RUN_ARG}" "$@" "${REPO_PATH}/e2e"
|
|
|
+ go test -timeout "${USERTIMEOUT}" -v -cpu 4 "${RUN_ARG}" "$@" "${REPO_PATH}/e2e"
|
|
|
}
|
|
|
|
|
|
function integration_e2e_pass {
|
|
|
echo "Running integration and e2e tests..."
|
|
|
|
|
|
- go test -timeout 20m -v -cpu 1,2,4 "$@" "${REPO_PATH}/e2e" &
|
|
|
+ go test -timeout 20m -v -cpu 4 "$@" "${REPO_PATH}/e2e" &
|
|
|
e2epid="$!"
|
|
|
- go test -timeout 20m -v -cpu 1,2,4 "$@" "${REPO_PATH}/integration" &
|
|
|
+ go test -timeout 20m -v -cpu 4 "$@" "${REPO_PATH}/integration" &
|
|
|
intpid="$!"
|
|
|
wait $e2epid
|
|
|
wait $intpid
|
|
|
@@ -312,21 +308,21 @@ function integration_e2e_pass {
|
|
|
}
|
|
|
|
|
|
function grpcproxy_pass {
|
|
|
- go test -timeout 20m -v ${RACE} -tags cluster_proxy -cpu 1,2,4 "$@" "${REPO_PATH}/integration"
|
|
|
- go test -timeout 20m -v ${RACE} -tags cluster_proxy -cpu 1,2,4 "$@" "${REPO_PATH}/clientv3/integration"
|
|
|
+ go test -timeout 20m -v ${RACE} -tags cluster_proxy -cpu 4 "$@" "${REPO_PATH}/integration"
|
|
|
+ go test -timeout 20m -v ${RACE} -tags cluster_proxy -cpu 4 "$@" "${REPO_PATH}/clientv3/integration"
|
|
|
go test -timeout 20m -v -tags cluster_proxy "$@" "${REPO_PATH}/e2e"
|
|
|
}
|
|
|
|
|
|
function release_pass {
|
|
|
rm -f ./bin/etcd-last-release
|
|
|
# to grab latest patch release; bump this up for every minor release
|
|
|
- UPGRADE_VER=$(git tag -l --sort=-version:refname "v3.3.*" | head -1)
|
|
|
+ UPGRADE_VER=$(git tag -l --sort=-version:refname "v3.2.*" | head -1)
|
|
|
if [ -n "$MANUAL_VER" ]; then
|
|
|
# in case, we need to test against different version
|
|
|
UPGRADE_VER=$MANUAL_VER
|
|
|
fi
|
|
|
if [[ -z ${UPGRADE_VER} ]]; then
|
|
|
- UPGRADE_VER="v3.3.0"
|
|
|
+ UPGRADE_VER="v3.2.0"
|
|
|
echo "fallback to" ${UPGRADE_VER}
|
|
|
fi
|
|
|
|