[dpkg] 14/200: test: Do not fail on missing fakeroot just skip them
Ximin Luo
infinity0 at debian.org
Wed Apr 5 15:17:08 UTC 2017
This is an automated email from the git hooks/post-receive script.
infinity0 pushed a commit to branch master
in repository dpkg.
commit 6ec8b1b4b180015924fb39a6f33d2f7527355324
Author: Guillem Jover <guillem at debian.org>
Date: Tue Nov 8 02:31:01 2016 +0100
test: Do not fail on missing fakeroot just skip them
---
debian/changelog | 4 ++++
scripts/t/dpkg_buildpackage.t | 8 ++++++--
t-func/atlocal.in | 4 ++--
3 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 2abf6ad..5438bd4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,9 @@
dpkg (1.18.14) UNRELEASED; urgency=medium
+ [ Guillem Jover ]
+ * Test suite:
+ - Do not fail tests on missing fakeroot, just skip them.
+
[ Updated man pages translations ]
* German (Helge Kreutzmann).
diff --git a/scripts/t/dpkg_buildpackage.t b/scripts/t/dpkg_buildpackage.t
index bf6cd44..5e363d6 100644
--- a/scripts/t/dpkg_buildpackage.t
+++ b/scripts/t/dpkg_buildpackage.t
@@ -16,8 +16,8 @@
use strict;
use warnings;
-use Test::More tests => 12;
-use Test::Dpkg qw(test_neutralize_checksums);
+use Test::More;
+use Test::Dpkg qw(:needs test_neutralize_checksums);
use File::Spec::Functions qw(rel2abs);
use File::Compare;
@@ -28,6 +28,10 @@ use Dpkg::IPC;
use Dpkg::Build::Types;
use Dpkg::Substvars;
+test_needs_command('fakeroot');
+
+plan tests => 12;
+
my $srcdir = rel2abs($ENV{srcdir} || '.');
my $datadir = "$srcdir/t/dpkg_buildpackage";
my $tmpdir = 't.tmp/dpkg_buildpackage';
diff --git a/t-func/atlocal.in b/t-func/atlocal.in
index 2fe4b55..50263fc 100644
--- a/t-func/atlocal.in
+++ b/t-func/atlocal.in
@@ -27,8 +27,8 @@ if [ "$(id -u)" = 0 ]; then
elif which fakeroot >/dev/null; then
ASROOT=fakeroot
else
- echo "error: cannot run as root(ish)" >&2
- exit 1
+ echo "skip: needs to run as root(ish)" >&2
+ exit 0
fi
export ASROOT
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/dpkg.git
More information about the Reproducible-commits
mailing list