diff options
Diffstat (limited to 't')
-rw-r--r-- | t/porting/authors.t | 5 | ||||
-rw-r--r-- | t/porting/cmp_version.t | 6 | ||||
-rw-r--r-- | t/porting/manifest.t | 2 | ||||
-rw-r--r-- | t/test.pl | 12 |
4 files changed, 17 insertions, 8 deletions
diff --git a/t/porting/authors.t b/t/porting/authors.t index 8777986c55..f67e93094c 100644 --- a/t/porting/authors.t +++ b/t/porting/authors.t @@ -4,13 +4,12 @@ BEGIN { @INC = '..' if -f '../TestInit.pm'; } -use TestInit 'T'; # T is chdir to the top level +use TestInit qw(T A); # T is chdir to the top level, A makes paths absolute use strict; require 't/test.pl'; find_git_or_skip('all'); -my $dotslash = $^O eq "MSWin32" ? ".\\" : "./"; -system("git log --pretty=fuller | ${dotslash}perl Porting/checkAUTHORS.pl --tap -"); +system("git log --pretty=fuller | $^X Porting/checkAUTHORS.pl --tap -"); # EOF diff --git a/t/porting/cmp_version.t b/t/porting/cmp_version.t index 2e3f15da2d..6204c57612 100644 --- a/t/porting/cmp_version.t +++ b/t/porting/cmp_version.t @@ -8,12 +8,10 @@ BEGIN { @INC = '..' if -f '../TestInit.pm'; } -use TestInit 'T'; # T is chdir to the top level +use TestInit qw(T A); # T is chdir to the top level, A makes paths absolute use strict; require 't/test.pl'; find_git_or_skip('all'); -my $dotslash = $^O eq "MSWin32" ? ".\\" : "./"; - -system "${dotslash}perl Porting/cmpVERSION.pl --exclude --tap"; +system "$^X Porting/cmpVERSION.pl --exclude --tap"; diff --git a/t/porting/manifest.t b/t/porting/manifest.t index caad26561f..292631ee2b 100644 --- a/t/porting/manifest.t +++ b/t/porting/manifest.t @@ -5,7 +5,7 @@ BEGIN { @INC = '..' if -f '../TestInit.pm'; } -use TestInit 'T'; # T is chdir to the top level +use TestInit qw(T A); # T is chdir to the top level, A makes paths absolute require 't/test.pl'; @@ -154,6 +154,18 @@ sub skip_all_without_config { sub find_git_or_skip { return if -d '.git'; + if (-l 'MANIFEST' && -l 'AUTHORS') { + my $where = readlink 'MANIFEST'; + die "Can't readling MANIFEST: $!" unless defined $where; + die "Confusing symlink target for MANIFEST, '$where'" + unless $where =~ s!/MANIFEST\z!!; + if (-d "$where/.git") { + # Looks like we are in a symlink tree + chdir $where or die "Can't chdir '$where': $!"; + note("Found source tree at $where"); + return; + } + } my $reason = 'not being run from a git checkout'; skip_all($reason) if $_[0] && $_[0] eq 'all'; skip($reason, @_); |