}
}
-tests_recursive (qw|
- t
-|);
+tests_recursive (
+ 't',
+ ( (
+ $Module::Install::AUTHOR
+ or
+ $ENV{DBICTEST_RUN_ALL_TESTS}
+ or
+ ( $ENV{TRAVIS}||'' ) eq 'true'
+ or
+ ( $ENV{AUTOMATED_TESTING} and ! $ENV{PERL5_CPANM_IS_RUNNING} and ! $ENV{RELEASE_TESTING} )
+ ) ? 'xt' : () ),
+);
install_script (qw|
script/dbicadmin
require File::Spec;
require File::Find;
-my $xt_dirs;
+my $xt_dist_dirs;
File::Find::find(sub {
- return if $xt_dirs->{$File::Find::dir};
- $xt_dirs->{$File::Find::dir} = 1 if (
+ return if $xt_dist_dirs->{$File::Find::dir};
+ $xt_dist_dirs->{$File::Find::dir} = 1 if (
$_ =~ /\.t$/ and -f $_
);
-}, 'xt');
+}, 'xt/dist');
-my @xt_tests = map { File::Spec->catfile($_, '*.t') } sort keys %$xt_dirs;
-
-# this will add the xt tests to the `make test` target among other things
-Meta->tests(join (' ', map { $_ || () } @xt_tests, Meta->tests ) );
+my @xt_dist_tests = map { File::Spec->catfile($_, '*.t') } sort keys %$xt_dist_dirs;
# inject an explicit xt test run, mainly to check the contents of
# lib and the generated POD's *before* anything is copied around
),
# test list
join( ' ',
- map { $mm_proto->quote_literal($_) } @xt_tests
+ map { $mm_proto->quote_literal($_) } @xt_dist_tests
),
)
]}
'$(ABSPERLRUN)',
map { $mm_proto->quote_literal($_) } qw(-Ilib -e $ENV{RELEASE_TESTING}=1;$ENV{DBICTEST_NO_MAKEFILE_VERIFICATION}=1;)
),
- 'xt/whitespace.t xt/footers.t',
+ 'xt/dist/postdistdir/*.t',
)
)
]}
# returned results, look through lib, find all mentioned ENVvars and
# set them to true and see if anything explodes
for var in \
+ DBICTEST_RUN_ALL_TESTS \
DBICTEST_SQLITE_REVERSE_DEFAULT_ORDER \
$( grep -P '\$ENV\{' -r lib/ --exclude-dir Optional | grep -oP '\bDBIC\w+' | sort -u | grep -vP '^(DBIC_TRACE(_PROFILE)?|DBIC_.+_DEBUG)$' )
do