[Pkg-libvirt-commits] [libguestfs] 24/165: tests/syslinux: factorize search for mbr.bin
Hilko Bengen
bengen at moszumanska.debian.org
Sat Aug 30 08:24:06 UTC 2014
This is an automated email from the git hooks/post-receive script.
bengen pushed a commit to branch experimental
in repository libguestfs.
commit f46d53be18f586daa6e3e8ed4975da26c940b203
Author: Pino Toscano <ptoscano at redhat.com>
Date: Fri May 9 12:19:47 2014 +0200
tests/syslinux: factorize search for mbr.bin
---
tests/syslinux/test-syslinux.pl | 21 ++++++++++++++-------
1 file changed, 14 insertions(+), 7 deletions(-)
diff --git a/tests/syslinux/test-syslinux.pl b/tests/syslinux/test-syslinux.pl
index d86c095..ce906eb 100755
--- a/tests/syslinux/test-syslinux.pl
+++ b/tests/syslinux/test-syslinux.pl
@@ -29,13 +29,20 @@ my $bootloader = $ENV{BOOTLOADER} || "syslinux";
my $disk = "$bootloader-guest.img";
# Find prerequisites.
-my $mbr = "/usr/share/syslinux/mbr.bin";
-unless (-f $mbr) {
- $mbr = "/usr/lib/syslinux/mbr.bin";
- unless (-f $mbr) {
- print "$0: mbr.bin (from SYSLINUX) not found, skipping test\n";
- exit 77;
- }
+my $mbr;
+my @mbr_paths = (
+ "/usr/share/syslinux/mbr.bin",
+ "/usr/lib/syslinux/mbr.bin"
+);
+foreach my $m (@mbr_paths) {
+ if (-f $m) {
+ $mbr = $m;
+ last;
+ }
+}
+unless (defined $mbr) {
+ print "$0: mbr.bin (from SYSLINUX) not found, skipping test\n";
+ exit 77;
}
print "mbr: $mbr\n";
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git
More information about the Pkg-libvirt-commits
mailing list