From patchwork Mon Dec 14 21:24:21 2015 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: 7849031 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 8B2A39F350 for ; Mon, 14 Dec 2015 21:24:56 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D270D200DC for ; Mon, 14 Dec 2015 21:24:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DE74A20114 for ; Mon, 14 Dec 2015 21:24:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932549AbbLNVYq (ORCPT ); Mon, 14 Dec 2015 16:24:46 -0500 Received: from mx1.redhat.com ([209.132.183.28]:34635 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932528AbbLNVYp (ORCPT ); Mon, 14 Dec 2015 16:24:45 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id 7D7D0550BA for ; Mon, 14 Dec 2015 21:24:45 +0000 (UTC) Received: from potion (dhcp-1-105.brq.redhat.com [10.34.1.105]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id tBELOh2v024717; Mon, 14 Dec 2015 16:24:43 -0500 Received: by potion (sSMTP sendmail emulation); Mon, 14 Dec 2015 22:24:42 +0100 From: =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= To: kvm@vger.kernel.org Cc: Paolo Bonzini , Andrew Jones Subject: [PATCH kvm-unit-tests 6/6] run_tests: print summary Date: Mon, 14 Dec 2015 22:24:21 +0100 Message-Id: <1450128261-21170-7-git-send-email-rkrcmar@redhat.com> In-Reply-To: <1450128261-21170-1-git-send-email-rkrcmar@redhat.com> References: <1450128261-21170-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=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_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 Add shortened SUMMARY line into the output (in parentheses). Might be interesting and hopefully won't break too many scripts. Signed-off-by: Radim Kr?má? --- run_tests.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/run_tests.sh b/run_tests.sh index b0b064f2e341..d0b282f7b079 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -21,6 +21,7 @@ function run() local arch="$6" local check="$7" local accel="$8" + local output if [ -z "$testname" ]; then return @@ -47,7 +48,7 @@ function run() # extra_params in the config file may contain backticks that need to be # expanded, so use eval to start qemu - eval $cmdline >> test.log + output=`eval $cmdline` # The first bit of return value is too hard to use, just skip it. # Unit-tests' return value is shifted by one. case $(($? >> 1)) in @@ -56,7 +57,11 @@ function run() *) echo -ne "\e[31mFAIL\e[0m" esac - echo " $1" + echo -n " $1 " + + printf "%s\n" "$output" | + tee -a test.log | + sed 'x;$s/^SUMMARY: //;ta;$s/.*//p;d;:a s/^/(/;s/$/)/' } function usage()