37 lines
569 B
Bash
37 lines
569 B
Bash
|
#!/usr/bin/env bash
|
||
|
|
||
|
OK=0
|
||
|
TOTAL=0
|
||
|
|
||
|
for file in `find . -name "*.gri" -exec basename {} \;`
|
||
|
do
|
||
|
echo -en "\e[34m$file ... \e[0m"
|
||
|
|
||
|
MSG="$(grino $file 2>&1 > /dev/null)"
|
||
|
RES=$?
|
||
|
|
||
|
if [ "$RES" == "0" ]
|
||
|
then
|
||
|
echo -e "ok"
|
||
|
OK=$(($OK + 1))
|
||
|
else
|
||
|
echo "ko"
|
||
|
echo -e "\t\e[31m$MSG\e[0m"
|
||
|
fi
|
||
|
|
||
|
TOTAL=$(($TOTAL + 1))
|
||
|
done
|
||
|
|
||
|
echo
|
||
|
|
||
|
if [ $OK -eq $TOTAL ]
|
||
|
then
|
||
|
echo -e "\e[32m=== $OK/$TOTAL tests passed ! ===\e[0m"
|
||
|
exit 0
|
||
|
fi
|
||
|
|
||
|
FAILURE=$(($TOTAL - $OK))
|
||
|
|
||
|
echo -e "\e[31m=== $FAILURE/$TOTAL tests failed ===\e[0m"
|
||
|
exit -1
|