mirror of https://github.com/k3s-io/k3s
Merge pull request #74854 from neolit123/conformance-nodes
conformace/run_e2e.sh: pass shellcheck and autodetect ginkgo nodespull/564/head
commit
b4e692b68f
|
@ -63,9 +63,9 @@ spec:
|
||||||
- name: E2E_SKIP
|
- name: E2E_SKIP
|
||||||
value: ""
|
value: ""
|
||||||
- name: E2E_PROVIDER
|
- name: E2E_PROVIDER
|
||||||
value: "local"
|
value: "skeleton"
|
||||||
- name: E2E_PARALLEL
|
- name: E2E_PARALLEL
|
||||||
value: "1"
|
value: "false"
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: output-volume
|
- name: output-volume
|
||||||
mountPath: /tmp/results
|
mountPath: /tmp/results
|
||||||
|
|
|
@ -25,7 +25,7 @@ shutdown () {
|
||||||
|
|
||||||
# Kind of a hack to wait for this pid to finish.
|
# Kind of a hack to wait for this pid to finish.
|
||||||
# Since it's not a child of this shell we cannot use wait.
|
# Since it's not a child of this shell we cannot use wait.
|
||||||
tail --pid ${E2E_SUITE_PID} -f /dev/null
|
tail --pid "${E2E_SUITE_PID}" -f /dev/null
|
||||||
saveResults
|
saveResults
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -39,23 +39,28 @@ saveResults() {
|
||||||
# We get the TERM from kubernetes and handle it gracefully
|
# We get the TERM from kubernetes and handle it gracefully
|
||||||
trap shutdown TERM
|
trap shutdown TERM
|
||||||
|
|
||||||
ginkgo_args=(
|
ginkgo_args=()
|
||||||
"--focus=${E2E_FOCUS}"
|
|
||||||
"--skip=${E2E_SKIP}"
|
|
||||||
"--noColor=true"
|
|
||||||
)
|
|
||||||
|
|
||||||
if [[ -n ${E2E_DRYRUN:-} ]]; then
|
if [[ -n ${E2E_DRYRUN:-} ]]; then
|
||||||
ginkgo_args+=("--dryRun=true")
|
ginkgo_args+=("--dryRun=true")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
case ${E2E_PARALLEL} in
|
case ${E2E_PARALLEL} in
|
||||||
'y'|'Y') ginkgo_args+=("--nodes=25") ;;
|
'y'|'Y'|'true')
|
||||||
[1-9]|[1-9][0-9]*) ginkgo_args+=("--nodes=${E2E_PARALLEL}") ;;
|
# The flag '--p' will automatically detect the optimal number of ginkgo nodes.
|
||||||
|
ginkgo_args+=("--p")
|
||||||
|
# Skip serial tests if parallel mode is enabled.
|
||||||
|
E2E_SKIP="\\[Serial\\]|${E2E_SKIP}" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
echo "/usr/local/bin/ginkgo ${ginkgo_args[@]} /usr/local/bin/e2e.test -- --disable-log-dump --repo-root=/kubernetes --provider=\"${E2E_PROVIDER}\" --report-dir=\"${RESULTS_DIR}\" --kubeconfig=\"${KUBECONFIG}\""
|
ginkgo_args+=(
|
||||||
/usr/local/bin/ginkgo "${ginkgo_args[@]}" /usr/local/bin/e2e.test -- --disable-log-dump --repo-root=/kubernetes --provider="${E2E_PROVIDER}" --report-dir="${RESULTS_DIR}" --kubeconfig="${KUBECONFIG}" | tee ${RESULTS_DIR}/e2e.log &
|
"--focus=${E2E_FOCUS}"
|
||||||
|
"--skip=${E2E_SKIP}"
|
||||||
|
"--noColor=true"
|
||||||
|
)
|
||||||
|
|
||||||
|
set -x
|
||||||
|
/usr/local/bin/ginkgo "${ginkgo_args[@]}" /usr/local/bin/e2e.test -- --disable-log-dump --repo-root=/kubernetes --provider="${E2E_PROVIDER}" --report-dir="${RESULTS_DIR}" --kubeconfig="${KUBECONFIG}" | tee "${RESULTS_DIR}"/e2e.log &
|
||||||
|
set +x
|
||||||
# $! is the pid of tee, not ginkgo
|
# $! is the pid of tee, not ginkgo
|
||||||
wait $(pgrep ginkgo)
|
wait "$(pgrep ginkgo)"
|
||||||
saveResults
|
saveResults
|
||||||
|
|
|
@ -17,7 +17,6 @@
|
||||||
./cluster/gce/upgrade-aliases.sh
|
./cluster/gce/upgrade-aliases.sh
|
||||||
./cluster/gce/upgrade.sh
|
./cluster/gce/upgrade.sh
|
||||||
./cluster/gce/util.sh
|
./cluster/gce/util.sh
|
||||||
./cluster/images/conformance/run_e2e.sh
|
|
||||||
./cluster/log-dump/log-dump.sh
|
./cluster/log-dump/log-dump.sh
|
||||||
./cluster/pre-existing/util.sh
|
./cluster/pre-existing/util.sh
|
||||||
./cluster/restore-from-backup.sh
|
./cluster/restore-from-backup.sh
|
||||||
|
|
Loading…
Reference in New Issue