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 4/6] run_tests: generalize check Date: Mon, 14 Dec 2015 22:24:19 +0100 Message-ID: <1450128261-21170-5-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]:43616 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932075AbbLNVYj (ORCPT ); Mon, 14 Dec 2015 16:24:39 -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 746B8C0A1609 for ; Mon, 14 Dec 2015 21:24:39 +0000 (UTC) In-Reply-To: <1450128261-21170-1-git-send-email-rkrcmar@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: config attribute "check" is currently unused. Provide a simple implementation instead of removing it. Signed-off-by: Radim Kr=C4=8Dm=C3=A1=C5=99 --- run_tests.sh | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/run_tests.sh b/run_tests.sh index 4d813b9a7084..b0b064f2e341 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -35,17 +35,10 @@ function run() return fi =20 - # check a file for a particular value before running a test - # the check line can contain multiple files to check separated by = a space - # but each check parameter needs to be of the form =3D - for check_param in ${check[@]}; do - 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)" - return - fi - done + eval $check || { + echo "skip $1 (failed \$($check))" + return + } =20 cmdline=3D"TESTNAME=3D$testname ACCEL=3D$accel ./$TEST_DIR-run $ke= rnel -smp $smp $opts" if [ $verbose !=3D 0 ]; then --=20 2.6.4