In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/e9c7535ad0fcaf974df036b720de4ba061847838?hp=a8f582bba994bddcc79d5064ab06171208405139>

- Log -----------------------------------------------------------------
commit e9c7535ad0fcaf974df036b720de4ba061847838
Author: Tony Cook <[email protected]>
Date:   Tue Apr 21 13:50:58 2015 +1000

    [perl #124357] make sure which_perl() can find ./perl on in op/dump.t
    
    OpenBSD doesn't set $^X to an absolute path. and since op/dump.t
    chdir()s to a temp directory, which_perl() produced "./perl" which
    is useless in the new directory.
    
    Instead manually set $^X to an absolute path so which_perl() can find
    it after the chdir.  This should be safe on the platforms we allow
    op/dump.t to run on.
-----------------------------------------------------------------------

Summary of changes:
 t/op/dump.t | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/t/op/dump.t b/t/op/dump.t
index 1db1637..7c5c3af 100644
--- a/t/op/dump.t
+++ b/t/op/dump.t
@@ -13,6 +13,7 @@ BEGIN {
 use Config;
 use File::Temp qw(tempdir);
 use Cwd qw(getcwd);
+use File::Spec;
 
 skip_all("only tested on devel builds")
   unless $Config{usedevel};
@@ -33,6 +34,11 @@ my $tmp = tempdir(CLEANUP => 1);
 
 my $start = getcwd;
 
+# on systems which don't make $^X absolute which_perl() in test.pl won't
+# return an absolute path, so once we change directories it can't
+# find ./perl, resulting in test failures
+$^X = File::Spec->rel2abs($^X);
+
 chdir $tmp
   or skip_all("Cannot chdir to work directory");
 

--
Perl5 Master Repository

Reply via email to