Commit 414ae795 authored by bgrant0607's avatar bgrant0607

Merge pull request #1837 from thockin/e2e

Clean up e2e more
parents 75e2cf8e 95f57dc8
...@@ -70,7 +70,7 @@ if [[ ${LEAVE_UP} -ne 1 ]]; then ...@@ -70,7 +70,7 @@ if [[ ${LEAVE_UP} -ne 1 ]]; then
fi fi
TEST_PATTERN="${TEST_PATTERN:-}" TEST_PATTERN="${TEST_PATTERN:-}"
any_failed=0 failed=()
for test_file in $(ls "${KUBE_ROOT}/hack/e2e-suite/"); do for test_file in $(ls "${KUBE_ROOT}/hack/e2e-suite/"); do
if [[ "${TEST_PATTERN}" != "" ]]; then if [[ "${TEST_PATTERN}" != "" ]]; then
check=".*${TEST_PATTERN}.*" check=".*${TEST_PATTERN}.*"
...@@ -81,21 +81,21 @@ for test_file in $(ls "${KUBE_ROOT}/hack/e2e-suite/"); do ...@@ -81,21 +81,21 @@ for test_file in $(ls "${KUBE_ROOT}/hack/e2e-suite/"); do
fi fi
echo "running $test_file" echo "running $test_file"
"${KUBE_ROOT}/hack/e2e-suite/${test_file}" result=0
result="$?" "${KUBE_ROOT}/hack/e2e-suite/${test_file}" || result="$?"
if [[ "${result}" -eq "0" ]]; then if [[ "${result}" -eq "0" ]]; then
echo "${test_file} returned ${result}; passed!" echo "${test_file} returned ${result}; passed!"
else else
echo "${test_file} returned ${result}; FAIL!" echo "${test_file} returned ${result}; FAIL!"
any_failed=$((any_failed+1)) failed+=(${test_file})
fi fi
done done
echo echo
if [[ ${any_failed} -eq 0 ]]; then if [[ "${#failed[*]}" -eq 0 ]]; then
echo "Final: All tests passed." echo "Final: All tests passed."
else else
echo "Final: ${any_failed} tests failed." echo "Final: ${#failed[@]} tests failed: ${failed[@]}."
fi fi
exit ${any_failed} exit "${#failed[@]}"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment