[debhelper-devel] [debhelper] 12/30: dh_missing: Remove unnecessary (fake)root requirement

Niels Thykier nthykier at moszumanska.debian.org
Mon Jul 3 14:40:37 UTC 2017


This is an automated email from the git hooks/post-receive script.

nthykier pushed a commit to branch master
in repository debhelper.

commit a9c532f3db53ad3c45fc61d9194ab8d493b2e271
Author: Niels Thykier <niels at thykier.net>
Date:   Sun Jul 2 11:43:57 2017 +0000

    dh_missing: Remove unnecessary (fake)root requirement
---
 t/dh_missing/dh_missing.t | 41 ++++++++++++++---------------------------
 1 file changed, 14 insertions(+), 27 deletions(-)

diff --git a/t/dh_missing/dh_missing.t b/t/dh_missing/dh_missing.t
index 851c5ef..4de978c 100755
--- a/t/dh_missing/dh_missing.t
+++ b/t/dh_missing/dh_missing.t
@@ -8,34 +8,21 @@ use File::Basename ();
 chdir File::Basename::dirname($0) or die "Unable to chdir to ".File::Basename::dirname($0);
 
 my $TOPDIR = "../..";
-my $rootcmd;
-
-if ($< == 0) {
-	$rootcmd = '';
-}
-else {
-	system("fakeroot true 2>/dev/null");
-	$rootcmd = $? ? undef : 'fakeroot';
-}
-
-if (not defined($rootcmd)) {
-	plan skip_all => 'fakeroot required';
-}
-else {
-	plan(tests => 5);
-}
+
+plan(tests => 5);
+
 
 # Verify dh_missing does not fail when all files are installed.
 system("$TOPDIR/dh_clean");
-system("$rootcmd make install");
-system("PATH=$TOPDIR:\$PATH $rootcmd $TOPDIR/dh_install");
-is(system("$rootcmd $TOPDIR/dh_missing --fail-missing"), 0, 'dh_missing failed');
+system("make install");
+system("PATH=$TOPDIR:\$PATH $TOPDIR/dh_install");
+is(system("$TOPDIR/dh_missing --fail-missing"), 0, 'dh_missing failed');
 
 # Verify dh_missing does fail when not all files are installed.
-system("$rootcmd $TOPDIR/dh_clean");
-system("$rootcmd make installmore");
-system("PATH=$TOPDIR:\$PATH $rootcmd $TOPDIR/dh_install");
-system("$rootcmd $TOPDIR/dh_missing --fail-missing >/dev/null 2>&1");
+system("$TOPDIR/dh_clean");
+system("make installmore");
+system("PATH=$TOPDIR:\$PATH $TOPDIR/dh_install");
+system("$TOPDIR/dh_missing --fail-missing >/dev/null 2>&1");
 isnt($?, -1, 'dh_missing was executed');
 ok(! ($? & 127), 'dh_missing did not die due to a signal');
 my $exitcode = ($? >> 8);
@@ -44,11 +31,11 @@ is($exitcode, 2, 'dh_missing exited with exit code 2');
 # Verify that dh_install -X --fail-missing is passed through to dh_missing (#863447)
 # dh_install -Xfile makes file-for-foo not be installed. Then we shouldn't
 # complain about it not being missing.
-system("$rootcmd $TOPDIR/dh_clean");
-system("$rootcmd make install");
-is(system("PATH=$TOPDIR:\$PATH $rootcmd $TOPDIR/dh_install -X more --exclude lots --fail-missing"),0, 'dh_install -X... --fail-missing failed');
+system("$TOPDIR/dh_clean");
+system("make install");
+is(system("PATH=$TOPDIR:\$PATH $TOPDIR/dh_install -X more --exclude lots --fail-missing"),0, 'dh_install -X... --fail-missing failed');
 
-system("$rootcmd $TOPDIR/dh_clean");
+system("$TOPDIR/dh_clean");
 
 # Local Variables:
 # indent-tabs-mode: t

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debhelper/debhelper.git




More information about the debhelper-devel mailing list