1 # libguestfs Perl bindings -*- perl -*-
2 # Copyright (C) 2009 Red Hat Inc.
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2 of the License, or
7 # (at your option) any later version.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23 eval "use Locale::TextDomain";;
24 if (exists $INC{"Locale/TextDomain.pm"}) {
27 plan skip_all => "no perl-libintl module";
33 use Sys::Guestfs::Lib;
35 my $h = Sys::Guestfs->new ();
38 $h->add_drive_ro ("../images/test.iso");
44 $h->mount_ro ("/dev/sda", "/");
47 is (Sys::Guestfs::Lib::file_architecture ($h, "/bin-i586-dynamic"),
49 is (Sys::Guestfs::Lib::file_architecture ($h, "/bin-sparc-dynamic"),
51 is (Sys::Guestfs::Lib::file_architecture ($h, "/bin-win32.exe"),
53 is (Sys::Guestfs::Lib::file_architecture ($h, "/bin-win64.exe"),
55 is (Sys::Guestfs::Lib::file_architecture ($h, "/bin-x86_64-dynamic"),
57 is (Sys::Guestfs::Lib::file_architecture ($h, "/lib-i586.so"),
59 is (Sys::Guestfs::Lib::file_architecture ($h, "/lib-sparc.so"),
61 is (Sys::Guestfs::Lib::file_architecture ($h, "/lib-win32.dll"),
63 is (Sys::Guestfs::Lib::file_architecture ($h, "/lib-win64.dll"),
65 is (Sys::Guestfs::Lib::file_architecture ($h, "/lib-x86_64.so"),
67 is (Sys::Guestfs::Lib::file_architecture ($h, "/initrd-x86_64.img"),
69 is (Sys::Guestfs::Lib::file_architecture ($h, "/initrd-x86_64.img.gz"),