From 2242718e1790446deeb9322dfd0851dfe77e9663 Mon Sep 17 00:00:00 2001 From: Erik Wilson Date: Wed, 31 Jul 2019 00:53:08 -0700 Subject: [PATCH] Run ginkgo in foreground, elminiate wait & pgrep Use bash process substitution for sending ginkgo output through tee, allowing easy capture of the ginkgo exit code and avoiding use of wait or pgrep. For #78699 --- cluster/images/conformance/run_e2e.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cluster/images/conformance/run_e2e.sh b/cluster/images/conformance/run_e2e.sh index e24d8b52c2b..6301b7fc270 100755 --- a/cluster/images/conformance/run_e2e.sh +++ b/cluster/images/conformance/run_e2e.sh @@ -67,9 +67,8 @@ ginkgo_args+=( ) 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}" -v="${E2E_VERBOSITY}" | tee "${RESULTS_DIR}"/e2e.log & +/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}" -v="${E2E_VERBOSITY}" > >(tee "${RESULTS_DIR}"/e2e.log) +ret=$? set +x -# $! is the pid of tee, not ginkgo -wait "$(pgrep ginkgo)" && ret=0 || ret=$? saveResults exit ${ret}