Merge pull request #27898 from lavalamp/fixv

Automatic merge from submit-queue

Detect flakes in PR builder e2e runs

Won't be mergable until https://github.com/onsi/ginkgo/pull/261 is agreed upon and merged.

Tossing a PR here to get the e2e test to run on it.
This commit is contained in:
k8s-merge-robot
2016-07-18 16:17:02 -07:00
committed by GitHub
15 changed files with 135 additions and 28 deletions

View File

@@ -30,6 +30,9 @@ e2e_test=$(kube::util::find-binary "e2e.test")
GINKGO_PARALLEL=${GINKGO_PARALLEL:-n} # set to 'y' to run tests in parallel
# If 'y', will rerun failed tests once to give them a second chance.
GINKGO_TOLERATE_FLAKES=${GINKGO_TOLERATE_FLAKES:-n}
# The number of tests that can run in parallel depends on what tests
# are running and on the size of the cluster. Too many, and tests will
# fail due to resource contention. 25 is a reasonable default for a
@@ -101,6 +104,11 @@ elif [[ ${GINKGO_PARALLEL} =~ ^[yY]$ ]]; then
ginkgo_args+=("--nodes=25")
fi
FLAKE_ATTEMPTS=1
if [[ "${GINKGO_TOLERATE_FLAKES}" == "y" ]]; then
FLAKE_ATTEMPTS=2
fi
# The --host setting is used only when providing --auth_config
# If --kubeconfig is used, the host to use is retrieved from the .kubeconfig
# file and the one provided with --host is ignored.
@@ -108,6 +116,7 @@ fi
export PATH=$(dirname "${e2e_test}"):"${PATH}"
"${ginkgo}" "${ginkgo_args[@]:+${ginkgo_args[@]}}" "${e2e_test}" -- \
"${auth_config[@]:+${auth_config[@]}}" \
--ginkgo.flakeAttempts="${FLAKE_ATTEMPTS}" \
--host="${KUBE_MASTER_URL}" \
--provider="${KUBERNETES_PROVIDER}" \
--gce-project="${PROJECT:-}" \