From 68871dcc7fe67107bee8f9b663ee05585c40f8bb Mon Sep 17 00:00:00 2001 From: Nathan Fisher Date: Mon, 28 Aug 2023 22:44:35 -0400 Subject: [PATCH] Add color formatting for summary line after tests --- test/Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/Makefile b/test/Makefile index 1327610..ee1d524 100644 --- a/test/Makefile +++ b/test/Makefile @@ -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 $@