diff mbox

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

Message ID 1492755359-9123-1-git-send-email-bala24@linux.vnet.ibm.com (mailing list archive)
State New, archived
Headers show

Commit Message

Balamuruhan S April 21, 2017, 6:15 a.m. UTC
Changes required for x86/run to use the qemu_binary function
for seaching the qemu

Signed-off-by: Balamuruhan S <bala24@linux.vnet.ibm.com>
---
 x86/run | 25 +++++--------------------
 1 file changed, 5 insertions(+), 20 deletions(-)
diff mbox

Patch

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