xref: /openbsd/gnu/usr.bin/perl/t/porting/authors.t (revision e5dd7070)
1#!./perl -w
2# Test that there are no missing authors in AUTHORS
3
4BEGIN {
5    chdir 't' if -d 't';
6    require "./test.pl";
7    set_up_inc('../lib', '..');
8}
9
10use TestInit qw(T);    # T is chdir to the top level
11use strict;
12
13find_git_or_skip('all');
14skip_all(
15    "This distro may have modified some files in cpan/. Skipping validation.")
16  if $ENV{'PERL_BUILD_PACKAGING'};
17
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
28# This is the subset of "pretty=fuller" that checkAUTHORS.pl actually needs:
29print qx{git log --pretty=format:"Author: %an <%ae>" $revision_range | $^X Porting/checkAUTHORS.pl --tap -};
30
31# EOF
32