Print test summary

This commit is contained in:
Juho Teperi 2017-10-13 15:34:15 +03:00
parent 14c43e066f
commit 2279ef4c9d
2 changed files with 11 additions and 2 deletions

View File

@ -7,6 +7,7 @@ dependencies:
override:
- lein deps
- npm install -g karma-cli
- npm install
- ./prepare-tests.sh
test:
override:

View File

@ -4,11 +4,14 @@
trap "kill 0" SIGINT
reset='\033[0m'
blue='\033[0;34m'
red='\033[0;31m'
green='\033[0;32m'
blue='\033[0;34m'
EXIT=0
SUMMARY="$blue##\n## SUMMARY\n##$reset\n\n"
for env in test-environments/*; do
FAIL=0
name=$(basename "$env")
@ -23,11 +26,16 @@ for env in test-environments/*; do
[[ $? != "0" ]] && FAIL=1
if [[ $FAIL != "0" ]]; then
echo
echo -e "$red!! FAIL $name$reset"
echo -e "${red}FAIL $name$reset"
SUMMARY="$SUMMARY${red}FAIL $name$reset\n"
EXIT=1
else
SUMMARY="$SUMMARY${green}OK $name$reset\n"
fi
echo
echo
done
echo -e "$SUMMARY"
exit $EXIT