tests: Found three more references to the squashfs, replaced with ISO.
[libguestfs.git] / perl / t / 510-lib-file-arch.t
1 # libguestfs Perl bindings -*- perl -*-
2 # Copyright (C) 2009 Red Hat Inc.
3 #
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.
8 #
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.
13 #
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.
17
18 use strict;
19 use warnings;
20
21 BEGIN {
22     use Test::More;
23     eval "use Locale::TextDomain";;
24     if (exists $INC{"Locale/TextDomain.pm"}) {
25         plan tests => 17;
26     } else {
27         plan skip_all => "no perl-libintl module";
28         exit 0;
29     }
30 }
31
32 use Sys::Guestfs;
33 use Sys::Guestfs::Lib;
34
35 my $h = Sys::Guestfs->new ();
36 ok ($h);
37
38 $h->add_drive_ro ("../images/test.iso");
39 ok (1);
40
41 $h->launch ();
42 ok (1);
43 $h->wait_ready ();
44 ok (1);
45
46 $h->mount_ro ("/dev/sda", "/");
47 ok (1);
48
49 is (Sys::Guestfs::Lib::file_architecture ($h, "/bin-i586-dynamic"),
50     "i386");
51 is (Sys::Guestfs::Lib::file_architecture ($h, "/bin-sparc-dynamic"),
52     "sparc");
53 is (Sys::Guestfs::Lib::file_architecture ($h, "/bin-win32.exe"),
54     "i386");
55 is (Sys::Guestfs::Lib::file_architecture ($h, "/bin-win64.exe"),
56     "x86_64");
57 is (Sys::Guestfs::Lib::file_architecture ($h, "/bin-x86_64-dynamic"),
58     "x86_64");
59 is (Sys::Guestfs::Lib::file_architecture ($h, "/lib-i586.so"),
60     "i386");
61 is (Sys::Guestfs::Lib::file_architecture ($h, "/lib-sparc.so"),
62     "sparc");
63 is (Sys::Guestfs::Lib::file_architecture ($h, "/lib-win32.dll"),
64     "i386");
65 is (Sys::Guestfs::Lib::file_architecture ($h, "/lib-win64.dll"),
66     "x86_64");
67 is (Sys::Guestfs::Lib::file_architecture ($h, "/lib-x86_64.so"),
68     "x86_64");
69 is (Sys::Guestfs::Lib::file_architecture ($h, "/initrd-x86_64.img"),
70     "x86_64");
71 is (Sys::Guestfs::Lib::file_architecture ($h, "/initrd-x86_64.img.gz"),
72     "x86_64");