1
0
mirror of synced 2026-04-28 05:04:57 +00:00

Skip t/hook-inittab.t if /etc/inittab is not present

Fixes FTBFS on Ubuntu.
This commit is contained in:
Axel Beckert
2012-06-08 18:41:58 +02:00
parent 8ba16d0e7a
commit 917d3d6b2a
2 changed files with 18 additions and 17 deletions

2
debian/changelog vendored
View File

@@ -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

View File

@@ -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