From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= 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> References: <1450128261-21170-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]: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) In-Reply-To: <1450128261-21170-1-git-send-email-rkrcmar@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: 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=C4=8Dm=C3=A1=C5=99 --- 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=3D"$6" local check=3D"$7" local accel=3D"$8" + local output =20 if [ -z "$testname" ]; then return @@ -47,7 +48,7 @@ function run() =20 # 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=3D`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 =20 - echo " $1" + echo -n " $1 " + + printf "%s\n" "$output" | + tee -a test.log | + sed 'x;$s/^SUMMARY: //;ta;$s/.*//p;d;:a s/^/(/;s/$/)/' } =20 function usage() --=20 2.6.4