[Top][All Lists]

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

[PATCH] locate the qemu binary in the grub-shell test

From: Dustin Kirkland
Subject: [PATCH] locate the qemu binary in the grub-shell test
Date: Sat, 20 Feb 2010 08:28:53 -0600

The grub-shell test assumes that qemu-system-i386 will be the binary
used, and that it's available on the system.  Actually, on amd64/x86_64
systems, the appropriate binary is qemu-system-x86_64.  Furthermore, an
appropriate error should be thrown if neither executable is found.

2010-02-20  Dustin Kirkland <address@hidden>

        * tests/util/ locate the appropriate qemu system 
          binary, and exit non-zero, with an error message, if none are 

diff -Nur -x '*.orig' -x '*~' lucid/tests/util/
--- lucid/tests/util/      2010-02-20 07:58:35.062756000 -0600
+++  2010-02-20 08:22:07.797858157 -0600
@@ -92,6 +92,18 @@
+for i in qemu-system-i386 qemu-system-x86_64; do
+    if which ${i} >/dev/null; then
+       qemu=${i}
+       break
+    fi
+if [ "x${qemu}" = x ]; then
+    echo "qemu is not installed" 1>&2
+    exit 1
 if [ "x${source}" = x ] ; then
     while read; do
@@ -135,8 +147,7 @@
 cp ${isofile} ${fdafile}
-qemu-system-i386 ${qemuopts} -nographic -serial stdio -hda ${hdafile} -fda 
${fdafile} -cdrom ${isofile} -boot ${bootdev} | tr -d "\r" >${outfile}
+${qemu} ${qemuopts} -nographic -serial stdio -hda ${hdafile} -fda ${fdafile} 
-cdrom ${isofile} -boot ${bootdev} | tr -d "\r" >${outfile}
 cat $outfile
 rm -f ${tmpfile} ${outfile} ${cfgfile} ${isofile} ${hdafile} ${fdafile}

Attachment: signature.asc
Description: This is a digitally signed message part

reply via email to

[Prev in Thread] Current Thread [Next in Thread]