Commit | Line | Data |
---|---|---|
4bea1fe7 | 1 | package # hide from PAUSE |
39c9c72d | 2 | DBICTest::RunMode; |
ab340f7f | 3 | |
4 | use strict; | |
5 | use warnings; | |
6 | ||
dc4600b2 | 7 | # Mimic $Module::Install::AUTHOR |
8 | sub is_author { | |
dc4600b2 | 9 | return ( |
7b87b77c | 10 | ! -d 'inc/Module' |
dc4600b2 | 11 | or |
7b87b77c | 12 | -e 'inc/.author' |
dc4600b2 | 13 | ); |
14 | } | |
15 | ||
39c9c72d | 16 | sub is_smoker { |
6853e2c3 | 17 | return ( |
1a08c5ed | 18 | ( $ENV{AUTOMATED_TESTING} && ! $ENV{PERL5_CPANM_IS_RUNNING} && ! $ENV{RELEASE_TESTING} ) |
6853e2c3 | 19 | or |
20 | __PACKAGE__->is_ci | |
21 | ); | |
39c9c72d | 22 | } |
23 | ||
81b29c8d | 24 | sub is_ci { |
25 | return ( | |
26 | ($ENV{TRAVIS}||'') eq 'true' | |
27 | and | |
1ab8de44 | 28 | ($ENV{TRAVIS_REPO_SLUG}||'') =~ m|\w+/dbix-class$| |
81b29c8d | 29 | ) |
30 | } | |
31 | ||
39c9c72d | 32 | sub is_plain { |
6853e2c3 | 33 | return ( |
34 | ! $ENV{RELEASE_TESTING} | |
35 | and | |
36 | ! $ENV{DBICTEST_RUN_ALL_TESTS} | |
37 | and | |
38 | ! __PACKAGE__->is_smoker | |
39 | and | |
40 | ! __PACKAGE__->is_author | |
41 | ) | |
39c9c72d | 42 | } |
43 | ||
ab340f7f | 44 | 1; |