In perl.git, the branch blead has been updated <https://perl5.git.perl.org/perl.git/commitdiff/ab50f992f5e287f719dfe1f20969ce4cf04e0090?hp=b9a5a78fe9165a983bc689902ecc96cf490f92d0>
- Log ----------------------------------------------------------------- commit ab50f992f5e287f719dfe1f20969ce4cf04e0090 Author: Nicolas R <[email protected]> Date: Mon Nov 13 15:04:38 2017 -0600 travis.yaml: fixes for osx run brew update before installing ccache use TRAVIS_OS_NAME macro to check os commit 2857ab681513bae1800d7494e911ab9f892f342f Author: Nicolas R <[email protected]> Date: Mon Nov 13 13:54:49 2017 -0600 Adjust porting/authors.t for travisci Add plan to porting/authors.t skip_plan was used but no plan or tap output was defined. When the test is run by TravisCI, use a shorten revision range. We do not want to have a pull request impacted by the previous state of blead, and we do not want to check the merge commit from travis which is using the github author primary email address. commit aa175282682d06ba060a6619a51bf5530715032c Author: Nicolas R <[email protected]> Date: Mon Nov 13 09:34:16 2017 -0600 Remove win32 logic from t/porting/authors.t Remove special logic for windows by using 'qx'. Allow test to be run from main root directory. ----------------------------------------------------------------------- Summary of changes: .travis.yml | 4 ++-- t/porting/authors.t | 25 +++++++++++++++++++------ 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index 961a402682..cd235e74da 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,8 +12,8 @@ compiler: install: - git fetch --unshallow --tags # t/porting/cmp_version.t # install & enable ccache on osx - - if [ -d /Applications ]; then brew install ccache; fi - - if [ -d /Applications ]; then export PATH="/usr/local/opt/ccache/libexec:$PATH"; fi + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update && brew install ccache; fi + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export PATH="/usr/local/opt/ccache/libexec:$PATH"; fi env: global: diff --git a/t/porting/authors.t b/t/porting/authors.t index d64f81b5ce..0102e93bef 100644 --- a/t/porting/authors.t +++ b/t/porting/authors.t @@ -2,17 +2,30 @@ # Test that there are no missing authors in AUTHORS BEGIN { - @INC = '..' if -f '../TestInit.pm'; + chdir 't' if -d 't'; + require "./test.pl"; + set_up_inc('../lib', '..'); } -use TestInit qw(T); # T is chdir to the top level + +use TestInit qw(T); # T is chdir to the top level use strict; -require './t/test.pl'; find_git_or_skip('all'); -skip_all("This distro may have modified some files in cpan/. Skipping validation.") if $ENV{'PERL_BUILD_PACKAGING'}; +skip_all( + "This distro may have modified some files in cpan/. Skipping validation.") + if $ENV{'PERL_BUILD_PACKAGING'}; + +my $revision_range = ''; # could use 'v5.22.0..' as default, no reason to recheck all previous commits... +if ( $ENV{TRAVIS} && defined $ENV{TRAVIS_COMMIT_RANGE} ) { + # travisci is adding a merge commit when smoking a pull request + # unfortunately it's going to use the default GitHub email from the author + # which can differ from the one the author wants to use as part of the pull request + # let's simply use the TRAVIS_COMMIT_RANGE which list the commits we want to check + # all the more a pull request should not be impacted by blead being incorrect + $revision_range = $ENV{TRAVIS_COMMIT_RANGE}; +} # This is the subset of "pretty=fuller" that checkAUTHORS.pl actually needs: -my $quote = $^O =~ /^mswin/i ? q(") : q('); -system("git log --pretty=format:${quote}Author: %an <%ae>%n${quote} | $^X Porting/checkAUTHORS.pl --tap -"); +print qx{git log --pretty=format:"Author: %an <%ae>" $revision_range | $^X Porting/checkAUTHORS.pl --tap -}; # EOF -- Perl5 Master Repository
