From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Jones Subject: [kvm-unit-tests PATCH 5/6] runtime: move getopts to run_tests.sh Date: Fri, 22 Jan 2016 15:58:28 +0100 Message-ID: <1453474709-10679-6-git-send-email-drjones@redhat.com> References: <1453474709-10679-1-git-send-email-drjones@redhat.com> Cc: pbonzini@redhat.com, rkrcmar@redhat.com To: kvm@vger.kernel.org Return-path: Received: from mx1.redhat.com ([209.132.183.28]:59068 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753796AbcAVO6n (ORCPT ); Fri, 22 Jan 2016 09:58:43 -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 7A94CAACC9 for ; Fri, 22 Jan 2016 14:58:43 +0000 (UTC) In-Reply-To: <1453474709-10679-1-git-send-email-drjones@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: We don't need to check options in standalone tests, kick the loop and usage() function out to run_tests.sh Signed-off-by: Andrew Jones --- run_tests.sh | 36 ++++++++++++++++++++++++++++++++++++ scripts/runtime.bash | 37 +------------------------------------ 2 files changed, 37 insertions(+), 36 deletions(-) diff --git a/run_tests.sh b/run_tests.sh index 2312e031482a4..558b8e7431d8e 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -1,5 +1,7 @@ #!/bin/bash +verbose="no" + if [ ! -f config.mak ]; then echo "run ./configure && make first. See ./configure -h" exit @@ -7,9 +9,43 @@ fi source config.mak source scripts/functions.bash +function usage() +{ +cat < test.log diff --git a/scripts/runtime.bash b/scripts/runtime.bash index fc878f99c977f..63d1b9653007b 100644 --- a/scripts/runtime.bash +++ b/scripts/runtime.bash @@ -1,7 +1,6 @@ : "${RUNTIME_arch_run?}" qemu=${QEMU:-qemu-system-$ARCH} -verbose=0 function run() { @@ -40,7 +39,7 @@ function run() done cmdline="TESTNAME=$testname ACCEL=$accel $RUNTIME_arch_run $kernel -smp $smp $opts" - if [ $verbose != 0 ]; then + if [ "$verbose" = "yes" ]; then echo $cmdline fi @@ -58,40 +57,6 @@ function run() return $ret } -function usage() -{ -cat <