Merge pull request #14445 from eparis/verify-all-return-error

hack/verify-all.sh return error on errors
This commit is contained in:
Eric Tune 2015-09-23 16:18:40 -07:00
commit db78d27723

View File

@ -53,6 +53,7 @@ fi
EXCLUDE="verify-godeps.sh" EXCLUDE="verify-godeps.sh"
ret=0
for t in `ls $KUBE_ROOT/hack/verify-*.sh` for t in `ls $KUBE_ROOT/hack/verify-*.sh`
do do
if is-excluded $t ; then if is-excluded $t ; then
@ -61,9 +62,14 @@ do
fi fi
if $SILENT ; then if $SILENT ; then
echo -e "Verifying $t" echo -e "Verifying $t"
bash "$t" &> /dev/null && echo -e "${color_green}SUCCESS${color_norm}" || echo -e "${color_red}FAILED${color_norm}" if bash "$t" &> /dev/null; then
echo -e "${color_green}SUCCESS${color_norm}"
else else
bash "$t" || true echo -e "${color_red}FAILED${color_norm}"
ret=1
fi
else
bash "$t" || ret=1
fi fi
done done
@ -75,8 +81,16 @@ do
fi fi
if $SILENT ; then if $SILENT ; then
echo -e "Verifying $t" echo -e "Verifying $t"
python "$t" &> /dev/null && echo -e "${color_green}SUCCESS${color_norm}" || echo -e "${color_red}FAILED${color_norm}" if python "$t" &> /dev/null; then
echo -e "${color_green}SUCCESS${color_norm}"
else else
python "$t" || true echo -e "${color_red}FAILED${color_norm}"
ret=1
fi
else
python "$t" || ret=1
fi fi
done done
exit $ret
# ex: ts=2 sw=2 et filetype=sh