Add color formatting for summary line after tests

This commit is contained in:
Nathan Fisher 2023-08-28 22:44:35 -04:00
parent 981b4a24f3
commit 68871dcc7f

View file

@ -81,8 +81,10 @@ test: $(tests) output
else echo -e '\e[0;31mFailure\e[0m' ; \
fail=$$(expr $${fail} + 1) ; \
fi ; done || true ; \
if [ $${fail} == 0 ] ; then res="Ok" ; else res="FAILED" ; fi ; \
printf "\nResults: %s. %i succeeded; %i failed\n" $${res} $${success} $${fail}
if [ $${fail} == 0 ] ; \
then printf "\nResults: \e[0;32mOk\e[0m. %i succeeded; %i failed\n" $${success} $${fail} ; \
else printf "\nResults: \e[0;31mFAILED\e[0m. %i succeeded; %i failed\n" $${success} $${fail} ; \
fi
output:
@ [-d $@ ] 2>/dev/null || install -d $@