This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Adjust porting/authors.t for travisci
[perl5.git] / t / porting / authors.t
CommitLineData
2218aaa9 1#!./perl -w
2218aaa9 2# Test that there are no missing authors in AUTHORS
18388fdb 3
2218aaa9 4BEGIN {
aa175282
N
5 chdir 't' if -d 't';
6 require "./test.pl";
7 set_up_inc('../lib', '..');
2218aaa9 8}
aa175282
N
9
10use TestInit qw(T); # T is chdir to the top level
2218aaa9 11use strict;
2218aaa9 12
7cadc1d0 13find_git_or_skip('all');
aa175282
N
14skip_all(
15 "This distro may have modified some files in cpan/. Skipping validation.")
16 if $ENV{'PERL_BUILD_PACKAGING'};
2218aaa9 17
2857ab68
N
18my $revision_range = ''; # could use 'v5.22.0..' as default, no reason to recheck all previous commits...
19if ( $ENV{TRAVIS} && defined $ENV{TRAVIS_COMMIT_RANGE} ) {
20 # travisci is adding a merge commit when smoking a pull request
21 # unfortunately it's going to use the default GitHub email from the author
22 # which can differ from the one the author wants to use as part of the pull request
23 # let's simply use the TRAVIS_COMMIT_RANGE which list the commits we want to check
24 # all the more a pull request should not be impacted by blead being incorrect
25 $revision_range = $ENV{TRAVIS_COMMIT_RANGE};
26}
27
3ea0c581 28# This is the subset of "pretty=fuller" that checkAUTHORS.pl actually needs:
2857ab68 29print qx{git log --pretty=format:"Author: %an <%ae>" $revision_range | $^X Porting/checkAUTHORS.pl --tap -};
2218aaa9
JV
30
31# EOF