1
0
mirror of synced 2026-03-04 18:14:15 +00:00

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:
Axel Beckert
2015-07-30 18:57:52 +02:00
parent 00d283cf24
commit 5c0679ca45
2 changed files with 11 additions and 10 deletions

2
debian/changelog vendored
View File

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

View File

@@ -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();