X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=xt%2Fextra%2Flean_startup.t;h=2a5c8d5eaf5655790ff8a6af8bcc4810cbaa535c;hb=e3be2b6ff05d6794ccd8807af8cb494403690639;hp=072f58562ced48807c39fde499e3c92f75e79f9f;hpb=1888e80fedfddd48e33f6e11620b6ac9f505efb1;p=dbsrgits%2FDBIx-Class.git diff --git a/xt/extra/lean_startup.t b/xt/extra/lean_startup.t index 072f585..2a5c8d5 100644 --- a/xt/extra/lean_startup.t +++ b/xt/extra/lean_startup.t @@ -53,10 +53,8 @@ BEGIN { 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; @@ -72,7 +70,7 @@ BEGIN { if $ENV{PERL5OPT}; plan skip_all => 'Dependency load patterns are radically different before perl 5.10' - if $] < 5.010; + if "$]" < 5.010; # add what we loaded so far for (keys %INC) { @@ -83,6 +81,13 @@ BEGIN { } } +BEGIN { + delete $ENV{$_} for qw( + DBICTEST_VIA_REPLICATED + DBICTEST_DEBUG_CONCURRENCY_LOCKS + ); +} + ####### ### This is where the test starts ####### @@ -105,6 +110,7 @@ BEGIN { Sub::Defer Sub::Quote + File::Spec Scalar::Util List::Util Storable @@ -192,16 +198,11 @@ sub assert_no_missing_expected_requires { 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__,