From: Graham Knop Date: Tue, 14 Jan 2014 13:09:31 +0000 (-0500) Subject: slight adjustment to tempdir cleanup in bootstrap test X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=aab637e3e86c213cf63c65bf4743f6f97260de45;p=p5sagit%2Flocal-lib.git slight adjustment to tempdir cleanup in bootstrap test --- diff --git a/xt/bootstrap.t b/xt/bootstrap.t index 3df6e7e..ad6f561 100644 --- a/xt/bootstrap.t +++ b/xt/bootstrap.t @@ -58,6 +58,8 @@ for my $perl (@perl) { delete $ENV{PERL_LOCAL_LIB_ROOT}; delete $ENV{PERL_MM_OPT}; delete $ENV{PERL_MB_OPT}; + my $home = File::Temp->newdir; + local $ENV{HOME} = $home->dirname; diag "testing bootstrap with $perl"; for my $module (@modules) { @@ -67,7 +69,6 @@ for my $perl (@perl) { } } - $ENV{HOME} = my $home = File::Temp::tempdir( CLEANUP => 1 ); my $ll = File::Spec->catdir($home, 'local-lib'); open my $null_in, '<', File::Spec->devnull; @@ -86,6 +87,5 @@ for my $perl (@perl) { my $version = check_version($perl, $module->[0]); cmp_ok $version, '>=', $module->[1], "bootstrap installed new enough $module->[0]" or diag "PERL5LIB: $ENV{PERL5LIB}"; - } }