}
}
-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' : () ),
+tests_recursive ('t');
+tests_recursive ('xt') if (
+ $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} )
);
install_script (qw|
use Test::More;
use List::Util 'first';
+use Module::Runtime 'require_module';
use lib qw(t/lib maint/.Generated_Pod/lib);
use DBICTest;
use namespace::clean;
skip ("$module exempt", 1) if ($ex->{skip});
+ skip ("$module not loadable", 1) unless eval { require_module($module) };
+
# build parms up from ignore list
my $parms = {};
$parms->{trustme} =
CORE::require('Test/More.pm');
Test::More::fail ("Unexpected require of '$req' by $caller[0] ($caller[1] line $caller[2])");
- if ( $ENV{TEST_VERBOSE} or ! DBICTest::RunMode->is_plain ) {
- CORE::require('DBICTest/Util.pm');
- Test::More::diag( 'Require invoked' . DBICTest::Util::stacktrace() );
- }
+ CORE::require('DBICTest/Util.pm');
+ Test::More::diag( 'Require invoked' . DBICTest::Util::stacktrace() );
}
return $res;
my $nl;
for my $mod (keys %$expected_dbic_deps) {
(my $modfn = "$mod.pm") =~ s/::/\//g;
- unless ($INC{$modfn}) {
- my $err = sprintf "Expected DBIC core dependency '%s' never loaded - %s needs adjustment", $mod, __FILE__;
- if (DBICTest::RunMode->is_smoker or DBICTest::RunMode->is_author) {
- fail ($err)
- }
- else {
- diag "\n" unless $nl->{$mod}++;
- diag $err;
- }
- }
+ fail sprintf (
+ "Expected DBIC core dependency '%s' never loaded - %s needs adjustment",
+ $mod,
+ __FILE__
+ ) unless $INC{$modfn};
}
pass(sprintf 'All modules expected at %s line %s loaded by DBIC: %s',
__FILE__,
use warnings;
use Test::More;
+use Test::Exception;
+use File::Temp ();
use lib 't/lib';
-BEGIN {
- require DBICTest::RunMode;
- plan( skip_all => "Skipping test on plain module install" )
- if DBICTest::RunMode->is_plain;
-}
-
-use Test::Exception;
use DBICTest;
-use File::Temp ();
plan tests => 2;
my $wait_for = 120; # how many seconds to wait