mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 05:27:21 +00:00
In verify-all.sh, print check and its status in verbose mode
This commit is contained in:
parent
44b0bb1ae7
commit
d466c63f5c
@ -35,6 +35,14 @@ function is-excluded {
|
|||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function run-cmd() {
|
||||||
|
if ${SILENT}; then
|
||||||
|
"$@" &> /dev/null
|
||||||
|
else
|
||||||
|
"$@"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
while getopts ":v" opt; do
|
while getopts ":v" opt; do
|
||||||
case $opt in
|
case $opt in
|
||||||
v)
|
v)
|
||||||
@ -60,17 +68,13 @@ do
|
|||||||
echo "Skipping $t"
|
echo "Skipping $t"
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
if $SILENT ; then
|
|
||||||
echo -e "Verifying $t"
|
echo -e "Verifying $t"
|
||||||
if bash "$t" &> /dev/null; then
|
if run-cmd bash "$t"; then
|
||||||
echo -e "${color_green}SUCCESS${color_norm}"
|
echo -e "${color_green}SUCCESS${color_norm}"
|
||||||
else
|
else
|
||||||
echo -e "${color_red}FAILED${color_norm}"
|
echo -e "${color_red}FAILED${color_norm}"
|
||||||
ret=1
|
ret=1
|
||||||
fi
|
fi
|
||||||
else
|
|
||||||
bash "$t" || ret=1
|
|
||||||
fi
|
|
||||||
done
|
done
|
||||||
|
|
||||||
for t in `ls $KUBE_ROOT/hack/verify-*.py`
|
for t in `ls $KUBE_ROOT/hack/verify-*.py`
|
||||||
@ -79,17 +83,13 @@ do
|
|||||||
echo "Skipping $t"
|
echo "Skipping $t"
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
if $SILENT ; then
|
|
||||||
echo -e "Verifying $t"
|
echo -e "Verifying $t"
|
||||||
if python "$t" &> /dev/null; then
|
if run-cmd python "$t"; then
|
||||||
echo -e "${color_green}SUCCESS${color_norm}"
|
echo -e "${color_green}SUCCESS${color_norm}"
|
||||||
else
|
else
|
||||||
echo -e "${color_red}FAILED${color_norm}"
|
echo -e "${color_red}FAILED${color_norm}"
|
||||||
ret=1
|
ret=1
|
||||||
fi
|
fi
|
||||||
else
|
|
||||||
python "$t" || ret=1
|
|
||||||
fi
|
|
||||||
done
|
done
|
||||||
exit $ret
|
exit $ret
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user