From eb9c5ae59e49d86fd9ed90019834630efab0fee0 Mon Sep 17 00:00:00 2001 From: Yifan Gu Date: Tue, 12 Jan 2016 17:45:23 -0800 Subject: [PATCH] jenkins: Set '--nodes' when 'GINKGO_PARALLEL' is set. By default, if 'GINKGO_PARALLEL' is true, then '--nodes=$GINKGO_PARALLEL_NODES' will be passed. The default 'GINKGO_PARALLEL_NODES' is 30. --- hack/ginkgo-e2e.sh | 6 ++++-- hack/jenkins/e2e.sh | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/hack/ginkgo-e2e.sh b/hack/ginkgo-e2e.sh index c09b14f7dfe23..123c594e53f5e 100755 --- a/hack/ginkgo-e2e.sh +++ b/hack/ginkgo-e2e.sh @@ -81,8 +81,10 @@ if [[ -n "${CONFORMANCE_TEST_SKIP_REGEX:-}" ]]; then ginkgo_args+=("--skip=${CONFORMANCE_TEST_SKIP_REGEX}") ginkgo_args+=("--seed=1436380640") fi -if [[ ${GINKGO_PARALLEL} =~ ^[yY]$ ]]; then - ginkgo_args+=("-p") +if [[ -n "${GINKGO_PARALLEL_NODES:-}" ]]; then + ginkgo_args+=("--nodes=${GINKGO_PARALLEL_NODES}") +elif [[ ${GINKGO_PARALLEL} =~ ^[yY]$ ]]; then + ginkgo_args+=("--nodes=30") # By default, set --nodes=30. fi diff --git a/hack/jenkins/e2e.sh b/hack/jenkins/e2e.sh index f11c667574acf..2314c4e9394df 100755 --- a/hack/jenkins/e2e.sh +++ b/hack/jenkins/e2e.sh @@ -1101,6 +1101,7 @@ export E2E_DOWN="${E2E_DOWN:-true}" export E2E_CLEAN_START="${E2E_CLEAN_START:-}" # Used by hack/ginkgo-e2e.sh to enable ginkgo's parallel test runner. export GINKGO_PARALLEL=${GINKGO_PARALLEL:-} +export GINKGO_PARALLEL_NODES=${GINKGO_PARALLEL_NODES:-} export GINKGO_TEST_ARGS="${GINKGO_TEST_ARGS:-}" # If we are on PR Jenkins merging into master, use the local e2e.sh. Otherwise, use the latest on github.