This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Upgrade to libnet 1.0704.
[perl5.git] / t / TEST
diff --git a/t/TEST b/t/TEST
index 5fcc268..0a63f0e 100755 (executable)
--- a/t/TEST
+++ b/t/TEST
@@ -190,7 +190,8 @@ EOT
                or print "can't deparse '$deparse': $!.\n";
        }
        elsif ($type eq 'perl') {
-           my $run = "./perl $testswitch $switch $utf $test |";
+           my $perl = $ENV{PERL} || './perl';
+           my $run = "$perl $testswitch $switch $utf $test |";
            open(RESULTS,$run) or print "can't run '$run': $!.\n";
        }
        else {
@@ -250,9 +251,11 @@ EOT
        }
        if ($ENV{PERL_3LOG}) {
            my $tpp = $test;
+           $tpp =~ s:^../::;
            $tpp =~ s:/:_:g;
            $tpp =~ s:\.t$::;
-           rename("perl.3log", "perl.3log.$tpp");
+           rename("perl.3log", "perl.3log.$tpp") ||
+               die "rename: perl3.log to perl.3log.$tpp: $!\n";
        }
        $next = $next - 1;
        if ($ok && $next == $max) {