From 5fec14942c19cd45edfb0810ce99dd18f80a8e64 Mon Sep 17 00:00:00 2001 From: Maciej Szulik Date: Wed, 7 Feb 2018 15:21:46 +0100 Subject: [PATCH] Return information about which int tests failed in the summary --- hack/make-rules/test-cmd-util.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hack/make-rules/test-cmd-util.sh b/hack/make-rules/test-cmd-util.sh index fb57f9bf7fe..2f126be7c8e 100755 --- a/hack/make-rules/test-cmd-util.sh +++ b/hack/make-rules/test-cmd-util.sh @@ -106,7 +106,7 @@ function record_command() { juLog -output="${output}" -class="test-cmd" -name="${name}" "$@" if [[ $? -ne 0 ]]; then echo "Error when running ${name}" - foundError="True" + foundError="${foundError}""${name}"", " fi set -o nounset @@ -4537,7 +4537,7 @@ run_impersonation_tests() { # Requires an env var SUPPORTED_RESOURCES which is a comma separated list of # resources for which tests should be run. runTests() { - foundError="False" + foundError="" if [ -z "${SUPPORTED_RESOURCES:-}" ]; then echo "Need to set SUPPORTED_RESOURCES env var. It is a list of resources that are supported and hence should be tested. Set it to (*) to test all resources" @@ -5035,8 +5035,8 @@ runTests() { kube::test::clear_all - if [ "$foundError" == "True" ]; then - echo "TEST FAILED" + if [ ! -z "${foundError}" ]; then + echo "FAILED TESTS: ""${foundError}" exit 1 fi }