File: programs.t

package info (click to toggle)
xen-tools 4.9.2-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid
  • size: 1,476 kB
  • sloc: perl: 4,942; sh: 1,690; makefile: 268
file content (47 lines) | stat: -rwxr-xr-x 860 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!perl -w -I..
#
#  Test that we have several required programs present.
#
# Steve
# --
#

use Test::More;


#
#  Files that we want to use.
#
my @required = qw( /bin/ls /bin/dd /bin/mount /bin/cp /bin/tar );

#
#  Files that we might wish to use.
#
my @optional = qw( /usr/sbin/debootstrap /usr/bin/rpmstrap /usr/sbin/xm
                   /sbin/mkfs.ext3 /sbin/mkfs.xfs /sbin/mkfs.reiserfs
                   /sbin/mkfs.btrfs
               );



#
#  Test required programs
#
foreach my $file ( @required )
{
    ok( -x $file , "Required binary installed: $file" );
}

#
#  Test optional programs - if they exist then we ensure they are
# executable.  If they don't we'll not complain since they are optional.
#
foreach my $file ( @optional )
{
    if ( -e $file )
    {
        ok( -x $file , "Optional binary installed: $file" );
    }
}

done_testing();