From 2ecd4f54ffbcfe10f538a1e1dd596f16f5306abf Mon Sep 17 00:00:00 2001 From: steve Date: Thu, 15 Jun 2006 11:09:30 +0000 Subject: [PATCH] 2006-06-15 11:09:30 by steve Added to repository. Test that we have some binaries present, will avoid more bug reports like last nights... --- tests/programs.t | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100755 tests/programs.t diff --git a/tests/programs.t b/tests/programs.t new file mode 100755 index 0000000..da1ffca --- /dev/null +++ b/tests/programs.t @@ -0,0 +1,43 @@ +#!/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( /usr/sbin/debootstrap /bin/ls /bin/dd /bin/mount /bin/cp /bin/tar ); + +# +# Files that we might wish to use. +# +my @optional = qw( /usr/bin/rpmstrap /usr/sbin/xm ); + + + +# +# 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" ); + } +} +