From: Andrew Jones Subject: [kvm-unit-tests PATCH v2 2/6] run: check DRYRUN Date: Mon, 13 Jul 2015 19:02:59 +0200 Message-ID: <1436806983-29783-3-git-send-email-drjones@redhat.com> References: <1436806983-29783-1-git-send-email-drjones@redhat.com> Cc: pbonzini@redhat.com, mtosatti@redhat.com, jen@redhat.com To: kvm@vger.kernel.org Return-path: Received: from mx1.redhat.com ([209.132.183.28]:39403 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750792AbbGMRDL (ORCPT ); Mon, 13 Jul 2015 13:03:11 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id 028FC91DDA for ; Mon, 13 Jul 2015 17:03:10 +0000 (UTC) In-Reply-To: <1436806983-29783-1-git-send-email-drjones@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Only execute the test if DRYRUN isn't set to yes. This is used by mkstandalone.sh Signed-off-by: Andrew Jones --- arm/run | 12 +++++++----- x86/run | 11 +++++++---- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/arm/run b/arm/run index 662a8564674a3..8cc2fa2571967 100755 --- a/arm/run +++ b/arm/run @@ -44,9 +44,11 @@ fi command="$qemu $M -cpu $processor $chr_testdev" command+=" -display none -serial stdio -kernel" - echo $command "$@" -$command "$@" -ret=$? -echo Return value from qemu: $ret -exit $ret + +if [ "$DRYRUN" != "yes" ]; then + $command "$@" + ret=$? + echo Return value from qemu: $ret + exit $ret +fi diff --git a/x86/run b/x86/run index 5281fca2125d8..b4a35b2332846 100755 --- a/x86/run +++ b/x86/run @@ -44,7 +44,10 @@ fi command="${qemu} -enable-kvm $pc_testdev -vnc none -serial stdio $pci_testdev -kernel" echo ${command} "$@" -${command} "$@" -ret=$? -echo Return value from qemu: $ret -exit $ret + +if [ "$DRYRUN" != "yes" ]; then + ${command} "$@" + ret=$? + echo Return value from qemu: $ret + exit $ret +fi -- 2.4.3