From: Peter Rabbitson Date: Thu, 5 Mar 2015 17:59:48 +0000 (+0100) Subject: (travis) Make a separate is_ci runmode, separated from is_smoker X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=81b29c8d4a021dd3288ab68117198e5255f9d760;p=dbsrgits%2FDBIx-Class-Historic.git (travis) Make a separate is_ci runmode, separated from is_smoker --- diff --git a/t/lib/DBICTest/RunMode.pm b/t/lib/DBICTest/RunMode.pm index f1e5544..39661a1 100644 --- a/t/lib/DBICTest/RunMode.pm +++ b/t/lib/DBICTest/RunMode.pm @@ -198,12 +198,20 @@ sub is_author { sub is_smoker { return - ( ($ENV{TRAVIS}||'') eq 'true' and ($ENV{TRAVIS_REPO_SLUG}||'') eq 'dbsrgits/dbix-class' ) + __PACKAGE__->is_ci || ( $ENV{AUTOMATED_TESTING} && ! $ENV{PERL5_CPANM_IS_RUNNING} && ! $ENV{RELEASE_TESTING} ) ; } +sub is_ci { + return ( + ($ENV{TRAVIS}||'') eq 'true' + and + ($ENV{TRAVIS_REPO_SLUG}||'') eq 'dbsrgits/dbix-class' + ) +} + sub is_plain { return (! __PACKAGE__->is_smoker && ! __PACKAGE__->is_author && ! $ENV{RELEASE_TESTING} ) } diff --git a/t/zzzzzzz_authors.t b/t/zzzzzzz_authors.t index ce9a217..17a57f7 100644 --- a/t/zzzzzzz_authors.t +++ b/t/zzzzzzz_authors.t @@ -2,14 +2,16 @@ use warnings; use strict; use Test::More 'no_plan'; +use lib 't/lib'; +use DBICTest::RunMode; my $authorcount = scalar do { open (my $fh, '<', 'AUTHORS') or die "Unable to open AUTHORS - can't happen: $!\n"; map { chomp; ( ( ! $_ or $_ =~ /^\s*\#/ ) ? () : $_ ) } <$fh>; } or die "Known AUTHORS file seems empty... can't happen..."; -# do not announce anything under travis - we are watching for STDERR silence +# do not announce anything under ci - we are watching for STDERR silence diag "\n\n$authorcount contributors made this library what it is today\n\n" - unless ($ENV{TRAVIS}||'') eq 'true'; + unless DBICTest::RunMode->is_ci; ok 1;