Skip to contentSkip to conversation

testsuite: colorize test result output

PATCH New Stephen Hemminger 1 participant 1 message Nov 13, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 testsuite: colorize test result output

When running testsuite it is easy as a human to miss failure. Add symbol colorizing to SKIPED/PASS/FAIL output.

---
 testsuite/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
testsuite/Makefile +3 -3
index b3aebec1517b..2dc7f166c709 100644
@@ -85,11 +85,11 @@ endif
 		TC="$$i/tc/tc" IP="$$i/ip/ip" SS=$$i/misc/ss DEV="$(DEV)" IPVER="$@" SNAME="$$i" \
 		ERRF="$(RESULTS_DIR)/$@.$$o.err" $(PREFIX) tests/$@ > $(RESULTS_DIR)/$@.$$o.out; \
 		if [ "$$?" = "127" ]; then \
-			echo "SKIPPED"; \
+			echo -e "\e[1;35mSKIPPED\e[0m"; \
 		elif [ -e "$(RESULTS_DIR)/$@.$$o.err" ]; then \
-			echo "FAILED"; \
+			echo -e "\e[0;31mFAILED\e[0m"; \
 		else \
-			echo "PASS"; \
+			echo -e "\e[0;32mPASS\e[0m"; \
 		fi; \
 		rm "$$TMP_ERR" "$$TMP_OUT"; \
 		sudo dmesg > $(RESULTS_DIR)/$@.$$o.dmesg; \
Signature · 1 line
2.19.1