From: Dustin Kirkland <kirkland@canonical.com>
To: grub-devel@gnu.org
Cc: Colin Watson <cjwatson@ubuntu.com>, kirkland@canonical.com
Subject: [PATCH] locate the qemu binary in the grub-shell test
Date: Sat, 20 Feb 2010 08:28:53 -0600 [thread overview]
Message-ID: <1266676133.2348.30.camel@x200> (raw)
[-- Attachment #1: Type: text/plain, Size: 1550 bytes --]
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 <kirkland@canonical.com>
* tests/util/grub-shell.in: locate the appropriate qemu system
binary, and exit non-zero, with an error message, if none are
found
diff -Nur -x '*.orig' -x '*~' lucid/tests/util/grub-shell.in lucid.new/tests/util/grub-shell.in
--- lucid/tests/util/grub-shell.in 2010-02-20 07:58:35.062756000 -0600
+++ lucid.new/tests/util/grub-shell.in 2010-02-20 08:22:07.797858157 -0600
@@ -92,6 +92,18 @@
esac
done
+qemu=
+for i in qemu-system-i386 qemu-system-x86_64; do
+ if which ${i} >/dev/null; then
+ qemu=${i}
+ break
+ fi
+done
+if [ "x${qemu}" = x ]; then
+ echo "qemu is not installed" 1>&2
+ exit 1
+fi
+
if [ "x${source}" = x ] ; then
tmpfile=`mktemp`
while read; do
@@ -135,8 +147,7 @@
cp ${isofile} ${fdafile}
outfile=`mktemp`
-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 #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
next reply other threads:[~2010-02-20 14:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-20 14:28 Dustin Kirkland [this message]
2010-02-25 19:41 ` [PATCH] locate the qemu binary in the grub-shell test Vladimir 'φ-coder/phcoder' Serbinenko
2010-02-25 22:43 ` Anthony Liguori
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1266676133.2348.30.camel@x200 \
--to=kirkland@canonical.com \
--cc=cjwatson@ubuntu.com \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.