Commit 6eea2838 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #49720 from dhilipkumars/verifyAllFix

Automatic merge from submit-queue (batch tested with PRs 46519, 49794, 49720, 49692, 49821) [make verify] Display list of failed tests to the user at the end **What this PR does / why we need it**: Minor improvement to verify all script as it now displays list of failed tests at the end, makes it easier for fixing errors ``` $KUBE_VERIFY_GIT_BRANCH=someBranch hack/make-rules/verify.sh -v -Q . . . ======================== FAILED TESTS ======================== hack/make-rules/../../hack/verify-boilerplate.sh hack/make-rules/../../hack/verify-godep-licenses.sh hack/make-rules/../../hack/verify-readonly-packages.sh ``` **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #49845 **Special notes for your reviewer**: **Release note**: ```release-note None ```
parents 897ad358 f9d5abb7
...@@ -75,6 +75,18 @@ function run-cmd { ...@@ -75,6 +75,18 @@ function run-cmd {
fi fi
} }
# Collect Failed tests in this Array , initalize it to nil
FAILED_TESTS=()
function print-failed-tests {
echo -e "========================"
echo -e "${color_red}FAILED TESTS${color_norm}"
echo -e "========================"
for t in ${FAILED_TESTS[@]}; do
echo -e "${color_red}${t}${color_norm}"
done
}
function run-checks { function run-checks {
local -r pattern=$1 local -r pattern=$1
local -r runner=$2 local -r runner=$2
...@@ -98,6 +110,7 @@ function run-checks { ...@@ -98,6 +110,7 @@ function run-checks {
else else
echo -e "${color_red}FAILED${color_norm} ${t}\t${elapsed}s" echo -e "${color_red}FAILED${color_norm} ${t}\t${elapsed}s"
ret=1 ret=1
FAILED_TESTS+=(${t})
fi fi
done done
} }
...@@ -131,6 +144,10 @@ fi ...@@ -131,6 +144,10 @@ fi
ret=0 ret=0
run-checks "${KUBE_ROOT}/hack/verify-*.sh" bash run-checks "${KUBE_ROOT}/hack/verify-*.sh" bash
run-checks "${KUBE_ROOT}/hack/verify-*.py" python run-checks "${KUBE_ROOT}/hack/verify-*.py" python
if [[ ${ret} -eq 1 ]]; then
print-failed-tests
fi
exit ${ret} exit ${ret}
# ex: ts=2 sw=2 et filetype=sh # ex: ts=2 sw=2 et filetype=sh
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