Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update verify-all.sh: added $t to explicitly tell which script had an issue during a failed test #3286

Merged
merged 4 commits into from
Aug 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion hack/verify-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ SCRIPT_ROOT=$(dirname "${BASH_SOURCE}")/..
source "${SCRIPT_ROOT}/hack/kube-env.sh"

SILENT=true
FAILED_TEST=()

function is-excluded {
for e in $EXCLUDE; do
Expand Down Expand Up @@ -65,19 +66,30 @@ do
if bash "$t" &> /dev/null; then
echo -e "${color_green}SUCCESS${color_norm}"
else
echo -e "${color_red}FAILED${color_norm}"
echo -e "${color_red}FAILED: $t ${color_norm}"
FAILED_TEST+=("$t")
ret=1
fi
else
if bash "$t"; then
echo -e "${color_green}SUCCESS: $t ${color_norm}"
else
echo -e "${color_red}Test FAILED: $t ${color_norm}"
FAILED_TEST+=("$t")
ret=1
fi
fi
done

if [ ${#FAILED_TEST[@]} -ne 0 ]; then
echo -e "\n${color_red}Summary of failed tests:${color_norm}"
for test in "${FAILED_TEST[@]}"; do
echo -e "${color_red}- $test${color_norm}"
done
else
echo -e "\n${color_green}All tests passed successfully.${color_norm}"
fi

exit $ret

# ex: ts=2 sw=2 et filetype=sh