From: Dave Rolsky Date: Sat, 26 May 2012 21:46:14 +0000 (-0500) Subject: Add another MOOSE_TEST_MD option, MooseX X-Git-Tag: 2.0800~71 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMoose.git;a=commitdiff_plain;h=a559205a7d18e6fe2476d0710b253e6674804d9a Add another MOOSE_TEST_MD option, MooseX This tests MooseX modules and others that extend Moose. This is useful if you want to test some sort of internals change that doesn't affect the API for non-extension modules. Also added help text for the test that shows when MOOSE_TEST_MD is not set. --- diff --git a/xt/author/test-my-dependents.t b/xt/author/test-my-dependents.t index 646e501..c786ccb 100644 --- a/xt/author/test-my-dependents.t +++ b/xt/author/test-my-dependents.t @@ -5,7 +5,24 @@ use Cwd qw( abs_path ); use Test::More; BEGIN { - plan skip_all => 'This test will not run unless you set MOOSE_TEST_MD to a true value' + my $help = <<'EOF'; + + + This test will not run unless you set MOOSE_TEST_MD to a true value. + Valid values are: + + all Test every distro which depends on Moose except those that we know + cannot be tested. This is a lot of distros (thousands). + + MooseX Test all Moose extension distros + (MooseX modules plus a few others). + + $true Any other true value runs the default tests. We pick 200 random + distros and test them. + +EOF + + plan skip_all => $help unless $ENV{MOOSE_TEST_MD}; } @@ -132,7 +149,10 @@ my @dists = sort map { $_->{fields}{distribution} } @{ $res->{hits}{hits} }; -unless ( $ENV{MOOSE_TEST_MD} eq 'all' ) { +if ( $ENV{MOOSE_TEST_MD} eq 'MooseX' ) { + @dists = grep { /^(?:MooseX-|Fey-ORM)/ } @dists; +} +elsif ( $ENV{MOOSE_TEST_MD} ne 'all' ) { diag( 'Picking 200 random dependents to test. Set MOOSE_TEST_MD=all to test all dependents' );