From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1NiqKO-0004q8-3A for mharc-grub-devel@gnu.org; Sat, 20 Feb 2010 09:29:04 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NiqKL-0004pe-Ud for grub-devel@gnu.org; Sat, 20 Feb 2010 09:29:01 -0500 Received: from [140.186.70.92] (port=42325 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NiqKK-0004pW-6M for grub-devel@gnu.org; Sat, 20 Feb 2010 09:29:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NiqKJ-0003rw-CA for grub-devel@gnu.org; Sat, 20 Feb 2010 09:29:00 -0500 Received: from adelie.canonical.com ([91.189.90.139]:44703) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NiqKJ-0003rk-5P for grub-devel@gnu.org; Sat, 20 Feb 2010 09:28:59 -0500 Received: from hutte.canonical.com ([91.189.90.181]) by adelie.canonical.com with esmtp (Exim 4.69 #1 (Debian)) id 1NiqKH-0007G4-1w; Sat, 20 Feb 2010 14:28:57 +0000 Received: from cpe-66-69-226-228.austin.res.rr.com ([66.69.226.228] helo=[192.168.1.50]) by hutte.canonical.com with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1NiqKG-0006WN-Md; Sat, 20 Feb 2010 14:28:57 +0000 From: Dustin Kirkland To: grub-devel@gnu.org Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-EWBy9nQpCN+oQR5E7ohr" Date: Sat, 20 Feb 2010 08:28:53 -0600 Message-ID: <1266676133.2348.30.camel@x200> Mime-Version: 1.0 X-Mailer: Evolution 2.28.2 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) Cc: Colin Watson , kirkland@canonical.com Subject: [PATCH] locate the qemu binary in the grub-shell test X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2010 14:29:02 -0000 --=-EWBy9nQpCN+oQR5E7ohr Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 * tests/util/grub-shell.in: locate the appropriate qemu system=20 binary, and exit non-zero, with an error message, if none are=20 found diff -Nur -x '*.orig' -x '*~' lucid/tests/util/grub-shell.in lucid.new/test= s/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 =20 +qemu=3D +for i in qemu-system-i386 qemu-system-x86_64; do + if which ${i} >/dev/null; then + qemu=3D${i} + break + fi +done +if [ "x${qemu}" =3D x ]; then + echo "qemu is not installed" 1>&2 + exit 1 +fi + if [ "x${source}" =3D x ] ; then tmpfile=3D`mktemp` while read; do @@ -135,8 +147,7 @@ cp ${isofile} ${fdafile} =20 outfile=3D`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 ${fdafil= e} -cdrom ${isofile} -boot ${bootdev} | tr -d "\r" >${outfile} cat $outfile =20 rm -f ${tmpfile} ${outfile} ${cfgfile} ${isofile} ${hdafile} ${fdafile} --=-EWBy9nQpCN+oQR5E7ohr Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEABECAAYFAkt/8aIACgkQs7pNXIOmEZTSVACfTkj8Np5MYpmIYQlQkANCnIla kysAoItrvaZnOfT94RkjT67utswstxdM =Aceo -----END PGP SIGNATURE----- --=-EWBy9nQpCN+oQR5E7ohr--