From: Peter Rabbitson Date: Sat, 28 Jun 2014 10:23:52 +0000 (+0200) Subject: Forgotten reenable of syntax test to guard for 37af2968e X-Git-Tag: v0.082800~162 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=18637ebbd75e7c2fb129da41960fde4b63f8c8fe;p=dbsrgits%2FDBIx-Class.git Forgotten reenable of syntax test to guard for 37af2968e --- diff --git a/xt/strictures.t b/xt/strictures.t index 3996621..adfd9a7 100644 --- a/xt/strictures.t +++ b/xt/strictures.t @@ -12,9 +12,18 @@ unless ( DBIx::Class::Optional::Dependencies->req_ok_for ('test_strictures') ) { : plan skip_all => "Test needs: $missing" } - use File::Find; +# The rationale is - if we can load all our optdeps +# that are related to lib/ - then we should be able to run +# perl -c checks (via syntax_ok), and all should just work +my $missing_groupdeps_present = grep + { DBIx::Class::Optional::Dependencies->req_ok_for($_) } + grep + { $_ !~ /^ (?: test | rdbms | dist ) _ /x } + keys %{DBIx::Class::Optional::Dependencies->req_group_list} +; + find({ wanted => sub { -f $_ or return; @@ -31,7 +40,8 @@ find({ Test::Strict::strict_ok($f); Test::Strict::warnings_ok($f); - #Test::Strict::syntax_ok($f) if $f =~ /^ (?: lib )/x; + Test::Strict::syntax_ok($f) + if ! $missing_groupdeps_present and $f =~ /^ (?: lib )/x; }, no_chdir => 1, }, (qw(lib t examples maint)) );