From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Jones Subject: [kvm-unit-tests PATCH 1/9] x86/run: source config.mak Date: Fri, 10 Jul 2015 18:44:55 +0200 Message-ID: <1436546703-12258-2-git-send-email-drjones@redhat.com> References: <1436546703-12258-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]:44623 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932487AbbGJQpK (ORCPT ); Fri, 10 Jul 2015 12:45:10 -0400 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 EA10E2E6DBE for ; Fri, 10 Jul 2015 16:45:08 +0000 (UTC) In-Reply-To: <1436546703-12258-1-git-send-email-drjones@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: We'll use a variable from config.mak in a later patch. Try not to break users that have gotten used to doing cd x86; ./run test.flat by also looking in the parent directory. While at it, add this parent directory check to arm too. Signed-off-by: Andrew Jones --- arm/run | 8 ++++++-- x86/run | 10 ++++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/arm/run b/arm/run index 662a8564674a3..e50709dcd12f4 100755 --- a/arm/run +++ b/arm/run @@ -1,10 +1,14 @@ #!/bin/bash -if [ ! -f config.mak ]; then +if [ ! -f config.mak ] && [ ! -f ../config.mak ]; then echo run ./configure first. See ./configure -h exit 2 fi -source config.mak +if [ -f config.mak ]; then + source config.mak +else + source ../config.mak +fi processor="$PROCESSOR" qemu="${QEMU:-qemu-system-$ARCH_NAME}" diff --git a/x86/run b/x86/run index 5281fca2125d8..d00e8fece4b6d 100755 --- a/x86/run +++ b/x86/run @@ -2,6 +2,16 @@ NOTFOUND=1 TESTDEVNOTSUPP=2 +if [ ! -f config.mak ] && [ ! -f ../config.mak ]; then + echo run ./configure first. See ./configure -h + exit 2 +fi +if [ -f config.mak ]; then + source config.mak +else + source ../config.mak +fi + qemubinarysearch="${QEMU:-qemu-kvm qemu-system-x86_64}" for qemucmd in ${qemubinarysearch} -- 2.4.3