Skip t/hook-inittab.t if /etc/inittab is not present
Fixes FTBFS on Ubuntu.
This commit is contained in:
2
debian/changelog
vendored
2
debian/changelog
vendored
@@ -2,6 +2,8 @@ xen-tools (4.3~rc2~dev-1) UNRELEASED; urgency=low
|
||||
|
||||
* Disable tests of not yet used Xen::Tools. Fixes FTBFS in test suite
|
||||
due to not satisifed Moose dependency in Xen::Tools::Log.
|
||||
* Skip t/hook-inittab.t if /etc/inittab is not present on the build
|
||||
host. Fixes FTBFS on Ubuntu.
|
||||
|
||||
-- Axel Beckert <abe@debian.org> Fri, 08 Jun 2012 17:32:20 +0200
|
||||
|
||||
|
||||
@@ -7,39 +7,38 @@
|
||||
#
|
||||
|
||||
use strict;
|
||||
use Test::More qw( no_plan );
|
||||
use Test::More 'no_plan', skip_all => '/etc/inittab not present';
|
||||
use File::Temp;
|
||||
use File::Copy;
|
||||
|
||||
|
||||
#
|
||||
# Sanity check.
|
||||
# Check if build system has /etc/inittab.
|
||||
#
|
||||
ok( -e "/etc/inittab", "/etc/inittab exists." );
|
||||
|
||||
|
||||
SKIP: {
|
||||
skip '/etc/inittab not present' unless -e "/etc/inittab";
|
||||
|
||||
#
|
||||
# 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 ( $dir =~ /common/i );
|
||||
next if ( ! -d $dir );
|
||||
|
||||
if ( $dir =~ /hooks\/(.*)/ )
|
||||
foreach my $dir ( glob( "hooks/*" ) )
|
||||
{
|
||||
my $dist = $1;
|
||||
next if ( $dir =~ /CVS/i );
|
||||
next if ( $dir =~ /common/i );
|
||||
next if ( ! -d $dir );
|
||||
|
||||
next if ( $dist =~ /(edgy|dapper|ubuntu)/i );
|
||||
if ( $dir =~ /hooks\/(.*)/ )
|
||||
{
|
||||
my $dist = $1;
|
||||
|
||||
testHook( $dist );
|
||||
next if ( $dist =~ /(edgy|dapper|ubuntu)/i );
|
||||
|
||||
testHook( $dist );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} # SKIP
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user