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

ntyni pushed a commit to branch ntyni/autopkgtest
in repository pkg-perl-tools.

commit 3f0e35f99d4a27f385f919b8969cb2b3f7905de3
Author: Niko Tyni <nt...@debian.org>
Date:   Wed Dec 7 20:39:40 2016 +0200

    use.t: run the test with $AUTOPKGTEST_TMP as cwd
    
    We fall back to the deprecated $ADTTMP, and failing that,
    use File::Temp to make a directory for us.
    
    Closes: #847284
---
 autopkgtest/scripts/runtime-deps.d/use.t | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/autopkgtest/scripts/runtime-deps.d/use.t 
b/autopkgtest/scripts/runtime-deps.d/use.t
index 0d42b4b..617ac1c 100755
--- a/autopkgtest/scripts/runtime-deps.d/use.t
+++ b/autopkgtest/scripts/runtime-deps.d/use.t
@@ -4,6 +4,7 @@ use strict;
 use Test::More;
 use Getopt::Std;
 use CPAN::Meta;
+use File::Temp;
 
 sub usage {
     my $exit = shift;
@@ -89,7 +90,13 @@ plan tests => 4 * scalar @modules;
 
 # don't run the command in the source directory, in case
 # cwd is on @INC
-chdir('/');
+
+my $dir;
+$dir = $ENV{'AUTOPKGTEST_TMP'};
+$dir = $ENV{'ADTTMP'} if !defined $dir;
+$dir = File::Temp::tempdir( CLEANUP => 1 ) if !defined $dir;
+
+chdir($dir) or die("can't chdir to $dir");
 
 for my $mod (@modules) {
   for my $envprefix ('', 'env PERL_DL_NONLAZY=1 ') {

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-perl/packages/pkg-perl-tools.git

_______________________________________________
Pkg-perl-cvs-commits mailing list
Pkg-perl-cvs-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-perl-cvs-commits

Reply via email to