[kvm-unit-tests PATCH 1/9] x86/run: source config.mak

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <drjones@xxxxxxxxxx>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux