allow only specifying certain dists to test (wickline)
[gitmo/Moose.git] / xt / author / test-my-dependents.t
index 30a4c83..c025027 100644 (file)
@@ -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) {
@@ -199,6 +210,7 @@ Dist-Zilla-PluginBundle-ARODLAND       # no tests
 Dist-Zilla-PluginBundle-Author-OLIVER  # no tests
 Dist-Zilla-PluginBundle-NUFFIN         # no tests
 Dist-Zilla-Plugin-DualLife             # no tests
+Dist-Zilla-Plugin-Git-Describe         # no tests
 Dist-Zilla-Plugin-GitFlow              # no tests
 Dist-Zilla-Plugin-GitFmtChanges        # no tests
 Dist-Zilla-Plugin-MetaResourcesFromGit # no tests
@@ -225,6 +237,7 @@ OpenDocument-Template                  # no tests
 Pod-Weaver-Section-Consumes            # no tests
 Pod-Weaver-Section-Encoding            # no tests
 Pod-Weaver-Section-Extends             # no tests
+P50Tools                               # no tests
 POE-Component-Server-MySQL             # no tests
 Random-Quantum                         # no tests
 SchemaEvolution                        # no tests
@@ -257,6 +270,7 @@ Crypt-Random-Source-Strong-Win32       # windows only
 Curses-Toolkit                         # requires Curses which requires ncurses library
 Dackup                                 # requires ssh
 Data-Collector                         # requires ssh
+Data-Riak                              # requires riak
 DBIx-PgLink                            # requires postgres installation
 Dist-Zilla-Plugin-Subversion           # requires svn bindings
 Dist-Zilla-Plugin-SVK                  # requires svn bindings
@@ -276,6 +290,7 @@ K                                      # requires kx
 Lighttpd-Control                       # requires lighttpd
 Lingua-TreeTagger                      # requires treetagger to be installed
 Math-Lsoda                             # requires f77
+Message-Passing-ZeroMQ                 # requires zeromq installation
 MongoDBI                               # requires mongo
 MongoDB                                # requires mongo
 MSWord-ToHTML                          # requires abiword to be installed
@@ -343,6 +358,7 @@ DBIx-VersionedDDL                      # runs a script with /usr/bin/perl in the
 File-Tail-Scribe                       # tests hang
 Gearman-Driver                         # spews tar errors
 IPC-AnyEvent-Gearman                   # tests hang
+Lingua-YALI                            # runs scripts with /usr/bin/env perl in the shbang line
 Net-SSH-Mechanize                      # the mock-ssh script it runs seems to spin endlessly
 POE-Component-Server-SimpleHTTP-PreFork # tests hang
 WWW-Hashdb                             # test hangs, pegging cpu