1
0
mirror of synced 2026-01-17 08:32:49 +00:00
xen-tools.xen-tools/t/programs.t
Stéphane Jourdois 0cb0a8716c Debootstrap only exists on Debian and Ubuntu
Do not fail this test on other distribs.
2010-07-23 13:29:56 +02:00

45 lines
815 B
Perl
Executable File

#!/usr/bin/perl -w -I..
#
# Test that we have several required programs present.
#
# Steve
# --
#
use Test::More qw( no_plan );
#
# 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 );
#
# 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" );
}
}