From patchwork Fri Apr 15 20:52:49 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmFkaW0gS3LEjW3DocWZ?= X-Patchwork-Id: 8858411 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 225CD9F3A0 for ; Fri, 15 Apr 2016 20:53:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5382820279 for ; Fri, 15 Apr 2016 20:53:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7D8BE20295 for ; Fri, 15 Apr 2016 20:53:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751620AbcDOUxW (ORCPT ); Fri, 15 Apr 2016 16:53:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50109 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751587AbcDOUxV (ORCPT ); Fri, 15 Apr 2016 16:53:21 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (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 53FFDC0467ED for ; Fri, 15 Apr 2016 20:53:21 +0000 (UTC) Received: from potion (dhcp-1-215.brq.redhat.com [10.34.1.215]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id u3FKrJT7019710; Fri, 15 Apr 2016 16:53:19 -0400 Received: by potion (sSMTP sendmail emulation); Fri, 15 Apr 2016 22:53:18 +0200 From: =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= To: kvm@vger.kernel.org Cc: Paolo Bonzini , Andrew Jones Subject: [PATCH v3 7/9] scripts/runtime: consolidate summary tags Date: Fri, 15 Apr 2016 22:52:49 +0200 Message-Id: <1460753571-20732-8-git-send-email-rkrcmar@redhat.com> In-Reply-To: <1460753571-20732-1-git-send-email-rkrcmar@redhat.com> References: <1460753571-20732-1-git-send-email-rkrcmar@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Turn skip into yellow SKIP and add reusable definitions of all tags. Signed-off-by: Radim Kr?má? Reviewed-by: Andrew Jones --- scripts/runtime.bash | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/scripts/runtime.bash b/scripts/runtime.bash index 4f29a59307f3..59f0df080988 100644 --- a/scripts/runtime.bash +++ b/scripts/runtime.bash @@ -2,6 +2,10 @@ : ${MAX_SMP:=$(getconf _NPROCESSORS_CONF)} : ${TIMEOUT:=90s} +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="$1" @@ -23,7 +27,7 @@ function run() fi if [ -n "$arch" ] && [ "$arch" != "$ARCH" ]; then - echo "skip $1 ($arch only)" + echo "`SKIP` $1 ($arch only)" return 2 fi @@ -34,14 +38,14 @@ function run() path=${check_param%%=*} value=${check_param#*=} if [ "$path" ] && [ "$(cat $path)" != "$value" ]; then - echo "skip $1 ($path not equal to $value)" + echo "`SKIP` $1 ($path not equal to $value)" return 2 fi done cmdline="TIMEOUT=$timeout ACCEL=$accel $RUNTIME_arch_run /dev/null -smp $smp $opts" eval $cmdline |& grep -q "could not load kernel" || { - echo "skip $1 (QEMU won't run)" + echo "`SKIP` $1 (QEMU won't run)" return 2 } @@ -56,13 +60,13 @@ function run() ret=$? 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=$timeout)" + echo "`FAIL` $1 (timeout; duration=$timeout)" else - echo -e "\e[31mFAIL\e[0m $1" + echo "`FAIL` $1" fi return $ret