1
0
mirror of synced 2026-02-13 10:54:09 +00:00

2006-06-25 20:02:33 by steve

Updated the tests to read the list of distributions we support by
 searching for directories beneath hooks/ rather than having a set list.
  This is in preference to updating them to include fedora now, and
 more in the future ..
This commit is contained in:
steve
2006-06-25 20:02:33 +00:00
parent 4561526719
commit c9d2ce03ad
4 changed files with 81 additions and 23 deletions

View File

@@ -4,7 +4,7 @@
#
# Steve
# --
# $Id: hook-inittab.t,v 1.4 2006-06-24 20:17:09 steve Exp $
# $Id: hook-inittab.t,v 1.5 2006-06-25 20:02:33 steve Exp $
#
use strict;
@@ -20,14 +20,24 @@ ok( -e "/etc/inittab", "/etc/inittab exists." );
#
# Rather than having a hardwired list of distributions to test
# against we look for subdirectories beneath hooks/ and test each
# one.
#
foreach my $dir ( glob( "hooks/*" ) )
{
next if ( $dir =~ /CVS/i );
next if ( ! -d $dir );
if ( $dir =~ /hooks\/(.*)/ )
{
my $dist = $1;
testHook( $dist );
}
}
#
# Test the inittab hooks
#
testHook( "centos4" );
testHook( "debian" );
testHook( "gentoo" );
testHook( "ubuntu" );
sub testHook

View File

@@ -4,7 +4,7 @@
#
# Steve
# --
# $Id: hook-tls.t,v 1.3 2006-06-24 20:18:27 steve Exp $
# $Id: hook-tls.t,v 1.4 2006-06-25 20:02:33 steve Exp $
#
use strict;
@@ -12,10 +12,26 @@ use Test::More qw( no_plan );
use File::Temp;
testTLSDisabling( "centos4" );
testTLSDisabling( "debian" );
testTLSDisabling( "gentoo" );
testTLSDisabling( "ubuntu" );
#
# Rather than having a hardwired list of distributions to test
# against we look for subdirectories beneath hooks/ and test each
# one.
#
foreach my $dir ( glob( "hooks/*" ) )
{
next if ( $dir =~ /CVS/i );
next if ( ! -d $dir );
if ( $dir =~ /hooks\/(.*)/ )
{
my $dist = $1;
testTLSDisabling( $dist );
}
}
#

View File

@@ -4,17 +4,30 @@
#
# Steve
# --
# $Id: hooks.t,v 1.6 2006-06-24 20:18:27 steve Exp $
# $Id: hooks.t,v 1.7 2006-06-25 20:02:33 steve Exp $
#
use strict;
use Test::More qw( no_plan );
testDistroHooks( "centos4" );
testDistroHooks( "debian" );
testDistroHooks( "gentoo" );
testDistroHooks( "ubuntu" );
#
# Rather than having a hardwired list of distributions to test
# against we look for subdirectories beneath hooks/ and test each
# one.
#
foreach my $dir ( glob( "hooks/*" ) )
{
next if ( $dir =~ /CVS/i );
next if ( ! -d $dir );
if ( $dir =~ /hooks\/(.*)/ )
{
my $dist = $1;
testDistroHooks( $dist );
}
}
sub testDistroHooks

View File

@@ -5,7 +5,7 @@
#
# Steve
# --
# $Id: plugin-checks.t,v 1.6 2006-06-24 20:19:17 steve Exp $
# $Id: plugin-checks.t,v 1.7 2006-06-25 20:02:33 steve Exp $
#
@@ -13,11 +13,30 @@ use strict;
use Test::More qw( no_plan );
testPlugins( "centos4" );
testPlugins( "debian" );
testPlugins( "gentoo" );
testPlugins( "ubuntu" );
#
# Rather than having a hardwired list of distributions to test
# against we look for subdirectories beneath hooks/ and test each
# one.
#
foreach my $dir ( glob( "hooks/*" ) )
{
next if ( $dir =~ /CVS/i );
next if ( ! -d $dir );
if ( $dir =~ /hooks\/(.*)/ )
{
my $dist = $1;
testPlugins( $dist );
}
}
=head2 testPlugins
Test each plugin associated with the given directory.
=cut
sub testPlugins
{