[Reproducible-commits] [dpkg] 01/02: change current directory to srcdir/t/mk instead of using `make -C`

Mattia Rizzolo mattia at debian.org
Mon Jun 13 14:24:33 UTC 2016


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

mattia pushed a commit to branch pu/reproducible_builds
in repository dpkg.

commit e3020e3014bbf36a6a3199605eec024b9aea32aa
Author: HW42 <hw42 at ipsumj.de>
Date:   Mon Jun 13 14:17:34 2016 +0000

    change current directory to srcdir/t/mk instead of using `make -C`
    
    the new reproducible/fixdebugpath flag puts $PWD in the flags, but the current
    directory changes in between the tests, so the expected flags (computer early)
    are different to flags computer later.
    Changing directory before fixes this.
    
    Signed-off-by: Mattia Rizzolo <mattia at debian.org>
---
 scripts/t/mk.t | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/scripts/t/mk.t b/scripts/t/mk.t
index 04f88a7..699c7c0 100644
--- a/scripts/t/mk.t
+++ b/scripts/t/mk.t
@@ -23,20 +23,21 @@ use Dpkg::ErrorHandling;
 use Dpkg::IPC;
 use Dpkg::Vendor;
 
-my $srcdir = $ENV{srcdir} || '.';
-my $datadir = "$srcdir/t/mk";
-
 # Turn these into absolute names so that we can safely switch to the test
-# directory with «make -C».
+# directory.
 $ENV{$_} = rel2abs($ENV{$_}) foreach qw(srcdir DPKG_DATADIR DPKG_ORIGINS_DIR);
 
+my $srcdir = $ENV{srcdir} || '.';
+
+chdir "$srcdir/t/mk";
+
 # Delete variables that can affect the tests.
 delete $ENV{$_} foreach grep { m/^DEB_/ } keys %ENV;
 
 sub test_makefile {
     my $makefile = shift;
 
-    spawn(exec => [ 'make', '-C', $datadir, '-f', $makefile ],
+    spawn(exec => [ 'make', '-f', $makefile ],
           wait_child => 1, nocheck => 1);
     ok($? == 0, "makefile $makefile computes all values correctly");
 }

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