[kvm-unit-tests PATCH 4/4] x86/run: use qemu_binary to search qemu for x86

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

 



Changes required for x86/run to use the qemu_binary function
for seaching the qemu

Signed-off-by: Balamuruhan S <bala24@xxxxxxxxxxxxxxxxxx>
---
 x86/run | 25 +++++--------------------
 1 file changed, 5 insertions(+), 20 deletions(-)

diff --git a/x86/run b/x86/run
index 867a1cc..eebfef9 100755
--- a/x86/run
+++ b/x86/run
@@ -2,28 +2,13 @@
 
 [ -z "$STANDALONE" ] && source scripts/arch-run.bash
 
-qemubinarysearch="${QEMU:-qemu-kvm qemu-system-x86_64}"
+# qemu_binary () defined in scripts/arch-run.bash
+qemu_binary
 
-for qemucmd in ${qemubinarysearch}
-do
-	unset QEMUFOUND
-	unset qemu
-	if ! [ -z "${QEMUFOUND=$(${qemucmd} --help 2>/dev/null | grep "QEMU")}" ] &&
-			${qemucmd} -device '?' 2>&1 | grep -F -e \"testdev\" -e \"pc-testdev\" > /dev/null;
-	then
-		qemu="${qemucmd}"
-		break
-	fi
-done
-
-if      [ -z "${QEMUFOUND}" ]
-then
-	echo "A QEMU binary was not found, You can set a custom location by using the QEMU=<path> environment variable "
-	exit 2
-elif    [ -z "${qemu}" ]
+if ! ${qemu} -device '?' 2>&1 | grep -F -e \"testdev\" -e \"pc-testdev\" > /dev/null;
 then
-	echo "No Qemu test device support found"
-	exit 2
+    echo "No Qemu test device support found"
+    exit 2
 fi
 
 if
-- 
2.7.4




[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