From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= Subject: [kvm-unit-tests PATCH v4 08/13] scripts/runtime: consolidate summary tags Date: Wed, 11 May 2016 18:12:50 +0200 Message-ID: <1462983171-4208-9-git-send-email-rkrcmar@redhat.com> References: <1462983171-4208-1-git-send-email-rkrcmar@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Paolo Bonzini , Andrew Jones To: kvm@vger.kernel.org Return-path: Received: from mx1.redhat.com ([209.132.183.28]:41654 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932091AbcEKQNb (ORCPT ); Wed, 11 May 2016 12:13:31 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CAEAB63164 for ; Wed, 11 May 2016 16:13:30 +0000 (UTC) In-Reply-To: <1462983171-4208-1-git-send-email-rkrcmar@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Turn skip into yellow SKIP and add reusable definitions of all tags. Reviewed-by: Andrew Jones Signed-off-by: Radim Kr=C4=8Dm=C3=A1=C5=99 --- scripts/runtime.bash | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/scripts/runtime.bash b/scripts/runtime.bash index ed073721216c..8d374103a71c 100644 --- a/scripts/runtime.bash +++ b/scripts/runtime.bash @@ -2,6 +2,10 @@ : ${MAX_SMP:=3D$(getconf _NPROCESSORS_CONF)} : ${TIMEOUT:=3D90s} =20 +PASS() { echo -ne "\e[32mPASS\e[0m"; } +SKIP() { echo -ne "\e[33mSKIP\e[0m"; } +FAIL() { echo -ne "\e[31mFAIL\e[0m"; } + function run() { local testname=3D"$1" @@ -23,7 +27,7 @@ function run() fi =20 if [ -n "$arch" ] && [ "$arch" !=3D "$ARCH" ]; then - echo "skip $1 ($arch only)" + echo "`SKIP` $1 ($arch only)" return 2 fi =20 @@ -34,7 +38,7 @@ function run() path=3D${check_param%%=3D*} value=3D${check_param#*=3D} if [ "$path" ] && [ "$(cat $path)" !=3D "$value" ]; then - echo "skip $1 ($path not equal to $value)" + echo "`SKIP` $1 ($path not equal to $value)" return 2 fi done @@ -50,13 +54,13 @@ function run() ret=3D$? =20 if [ $ret -eq 0 ]; then - echo -e "\e[32mPASS\e[0m $1" + echo "`PASS` $1" elif [ $ret -eq 77 ]; then - echo -e "\e[33mSKIP\e[0m $1" + echo "`SKIP` $1" elif [ $ret -eq 124 ]; then - echo -e "\e[31mFAIL\e[0m $1 (timeout; duration=3D$timeout)" + echo "`FAIL` $1 (timeout; duration=3D$timeout)" else - echo -e "\e[31mFAIL\e[0m $1" + echo "`FAIL` $1" fi =20 return $ret --=20 2.8.2