Commit 3f0e35f9 authored by Niko Tyni's avatar Niko Tyni

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
parent 345244ce
......@@ -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
my $dir;
$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 ') {
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment