mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 14:37:00 +00:00
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 ```
This commit is contained in:
commit
6eea28381e
@ -75,6 +75,18 @@ function run-cmd {
|
||||
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 {
|
||||
local -r pattern=$1
|
||||
local -r runner=$2
|
||||
@ -98,6 +110,7 @@ function run-checks {
|
||||
else
|
||||
echo -e "${color_red}FAILED${color_norm} ${t}\t${elapsed}s"
|
||||
ret=1
|
||||
FAILED_TESTS+=(${t})
|
||||
fi
|
||||
done
|
||||
}
|
||||
@ -131,6 +144,10 @@ fi
|
||||
ret=0
|
||||
run-checks "${KUBE_ROOT}/hack/verify-*.sh" bash
|
||||
run-checks "${KUBE_ROOT}/hack/verify-*.py" python
|
||||
|
||||
if [[ ${ret} -eq 1 ]]; then
|
||||
print-failed-tests
|
||||
fi
|
||||
exit ${ret}
|
||||
|
||||
# ex: ts=2 sw=2 et filetype=sh
|
||||
|
Loading…
Reference in New Issue
Block a user