From: Jesse Luehrs Date: Sat, 21 Jul 2012 04:47:37 +0000 (-0500) Subject: allow only specifying certain dists to test (wickline) X-Git-Tag: 2.0800~31 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMoose.git;a=commitdiff_plain;h=a80872b23b54a607eae30c394b40e56f39c23f3a allow only specifying certain dists to test (wickline) --- diff --git a/xt/author/test-my-dependents.t b/xt/author/test-my-dependents.t index 6c6162d..c025027 100644 --- a/xt/author/test-my-dependents.t +++ b/xt/author/test-my-dependents.t @@ -11,14 +11,17 @@ BEGIN { 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). + all Test every dist 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). + Dist::1,Dist::2,... Test the individual dists listed. - $true Any other true value runs the default tests. We pick 200 random - distros and test them. + MooseX Test all Moose extension distros + (MooseX modules plus a few others). + + 1 Run the default tests. We pick 200 random dists and + test them. EOF @@ -123,7 +126,7 @@ my @dists = sort if ( $ENV{MOOSE_TEST_MD} eq 'MooseX' ) { @dists = grep { /^(?:MooseX-|Fey-ORM)/ } @dists; } -elsif ( $ENV{MOOSE_TEST_MD} ne 'all' ) { +elsif ( $ENV{MOOSE_TEST_MD} eq '1' ) { diag( <<'EOF' Picking 200 random dependents to test. Set MOOSE_TEST_MD=all to test all @@ -138,6 +141,14 @@ EOF @dists = @dists[ sort keys %indexes ]; } +elsif ( $ENV{MOOSE_TEST_MD} ne 'all' ) { + my @chosen = split /,/, $ENV{MOOSE_TEST_MD}; + my %dists = map { $_ => 1 } @dists; + if (my @unknown = grep { !$dists{$_} } @chosen) { + die "Unknown dists: @unknown"; + } + @dists = @chosen; +} plan tests => scalar @dists; for my $dist (@dists) {