From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: [PATCH iproute2] testsuite: colorize test result output Date: Mon, 12 Nov 2018 08:39:32 -0800 Message-ID: <20181112163932.9668-1-stephen@networkplumber.org> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Cc: Stephen Hemminger To: netdev@vger.kernel.org Return-path: Received: from mail-pl1-f182.google.com ([209.85.214.182]:40340 "EHLO mail-pl1-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726221AbeKMCdm (ORCPT ); Mon, 12 Nov 2018 21:33:42 -0500 Received: by mail-pl1-f182.google.com with SMTP id q19-v6so4590516pll.7 for ; Mon, 12 Nov 2018 08:39:42 -0800 (PST) Sender: netdev-owner@vger.kernel.org List-ID: When running testsuite it is easy as a human to miss failure. Add symbol colorizing to SKIPED/PASS/FAIL output. Signed-off-by: Stephen Hemminger --- testsuite/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/testsuite/Makefile b/testsuite/Makefile index b3aebec1517b..2dc7f166c709 100644 --- a/testsuite/Makefile +++ b/testsuite/Makefile @@ -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; \ -- 2.19.1