Fix Perl warning in t/hook-inittab.t if /etc/inittab isn't present
aka "proper use of skip". Fixes autopkgtest which failed due to STDERR output.
This commit is contained in:
2
debian/changelog
vendored
2
debian/changelog
vendored
@@ -4,6 +4,8 @@ xen-tools (4.6+dev-1) UNRELEASED; urgency=medium
|
||||
+ Declare GitHub as primary hosting.
|
||||
+ Integrate BUGS.markdown into README.markdown, move remaining
|
||||
contents of KNOWN_BUGS.markdown to the GitHub issue tracker.
|
||||
+ Fix Perl warning in t/hook-inittab.t if /etc/inittab isn't present.
|
||||
- Fixes failed autopkgtest.
|
||||
* Update Vcs-* headers to point to GitHub instead of GitLab.
|
||||
|
||||
-- Axel Beckert <abe@debian.org> Tue, 21 Jul 2015 12:04:41 +0200
|
||||
|
||||
@@ -16,14 +16,12 @@ my $hook_dir = $ENV{AS_INSTALLED_TESTING} ? '/usr/share/xen-tools' : 'hooks';
|
||||
#
|
||||
# Check if build system has /etc/inittab.
|
||||
#
|
||||
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.
|
||||
#
|
||||
if (-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( "$hook_dir/*" ) )
|
||||
{
|
||||
next if ( $dir =~ /CVS/i );
|
||||
@@ -39,8 +37,9 @@ SKIP: {
|
||||
testHook( $dist );
|
||||
}
|
||||
}
|
||||
} # SKIP
|
||||
|
||||
} else {
|
||||
plan skip_all => '/etc/inittab not present';
|
||||
}
|
||||
|
||||
done_testing();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user