[debhelper-devel] [debhelper] 01/01: t: Fix test under prove without passing "t" dir

Niels Thykier nthykier at moszumanska.debian.org
Wed Jul 12 05:59:52 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 7db95f249b2d71e41d0712136ecf281a328d5993
Author: Niels Thykier <niels at thykier.net>
Date:   Wed Jul 12 05:58:33 2017 +0000

    t: Fix test under prove without passing "t" dir
    
    Fix a test that failed when "prove" was called without the "t" dir
    explicitly.  I.e.
    
     prove -lr t # works
     prove -lr   # failed
    
    Now both works.
    
    Signed-off-by: Niels Thykier <niels at thykier.net>
---
 t/buildsystems/05-load-build-system.t | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/t/buildsystems/05-load-build-system.t b/t/buildsystems/05-load-build-system.t
index 447241b..23aed9f 100755
--- a/t/buildsystems/05-load-build-system.t
+++ b/t/buildsystems/05-load-build-system.t
@@ -15,7 +15,7 @@ use Debian::Debhelper::Buildsystem;
 
 my $DIR = dirname($0);
 my $SCRIPT = './load-bs.pl'; # relative to $DIR
-my $BS_CWD = Cwd::cwd() . "/${DIR}";
+my $BS_CWD = Cwd::realpath($DIR) or error("cannot resolve ${DIR}: $!");
 my $BS_CLASS = 'Debian::Debhelper::Buildsystem';
 my $bs = $BS_CLASS->new();
 my $default_builddir = $bs->DEFAULT_BUILD_DIRECTORY();

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