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:
@@ -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
|
||||
|
||||
@@ -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 );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user