3 plan skip_all => <<'END_HELP' unless $ENV{MOO_TEST_MD} || @ARGV;
4 This test will not run unless you set MOO_TEST_MD to a true value.
8 all Test every dist which depends on Moose except those
9 that we know cannot be tested. This is a lot of
12 Dist::1,Dist::2,... Test the individual dists listed.
14 MooX Test all Moo extension distros.
16 1 Run the default tests. We pick 200 random dists and
21 use Test::DependentModules qw( test_module );
25 # avoid any modules that depend on these
26 my @bad_prereqs = qw(Gtk2 Padre Wx);
28 my $mcpan = MetaCPAN::API->new;
29 my $res = $mcpan->post(
30 '/search/reverse_dependencies/Moo' => {
33 query => { "match_all" => {} },
36 { term => { 'release.status' => 'latest' } },
37 { term => { 'release.authorized' => \1 } },
38 { not => { filter => {
40 map { { term => { 'dependency.module' => $_ } } } @bad_prereqs,
48 fields => ['distribution', 'provides', 'metadata.provides'],
58 for my $line (<DATA>) {
60 next unless $line =~ /\S/;
61 if ( $line =~ /^#\s*(\w+)(?::\s*(.*?)\s*)?$/ ) {
62 die "Invalid action in DATA section ($1)"
63 unless $1 eq 'SKIP' || $1 eq 'TODO';
64 $hash = $1 eq 'SKIP' ? \%skip : \%todo;
68 my ( $dist, $reason ) = $line =~ /^(\S*)\s*(?:#\s*(.*?)\s*)?$/;
69 next unless defined $dist && length $dist;
71 $hash->{$dist} = $reason ? "$sec_reason: $reason" : $reason;
76 for my $hit (@{ $res->{hits}{hits} }) {
77 my $dist = $hit->{fields}{distribution};
79 if exists $skip{$dist};
81 if $dist =~ /^(?:Task|Bundle|Acme)-/;
83 my $module = (sort { length $a <=> length $b || $a cmp $b } do {
84 if (my $provides = $hit->{fields}{provides}) {
85 ref $provides ? @$provides : ($provides);
87 elsif (my $provides = $hit->{fields}{'metadata.provides'}) {
91 (my $module = $dist) =~ s/-/::/g;
95 $todo_module{$module} = $todo{$dist}
96 if exists $todo{$dist};
97 push @modules, $module;
100 @modules = sort @modules;
102 my @args = grep { $_ ne '--show' } @ARGV;
103 my $show = @args != @ARGV;
104 my $pick = $ENV{MOO_TEST_MD} || shift @args || 'all';
106 if ( $pick eq 'MooX' ) {
107 @modules = grep /^MooX(?:$|::)/, @modules;
109 elsif ( $pick =~ /^\d+$/ ) {
110 my $count = $pick == 1 ? 200 : $pick;
112 Picking $count random dependents to test. Set MOO_TEST_MD=all to test all
113 dependents or MOO_TEST_MD=MooX to test extension modules only.
115 @modules = (List::Util::shuffle(@modules))[0 .. $count-1];
117 elsif ( $pick ne 'all' ) {
118 my @chosen = split /,/, $ENV{MOO_TEST_MD};
119 my %modules = map { $_ => 1 } @modules;
120 if (my @unknown = grep { !$modules{$_} } @chosen) {
121 die "Unknown modules: @unknown";
127 print "Dependents:\n";
128 print " $_\n" for @modules;
132 plan tests => scalar @modules;
133 for my $module (@modules) {
134 local $TODO = $todo_module{$module} || '???'
135 if exists $todo_module{$module};
136 test_module($module);
144 Dancer2-Session-Sereal # 0.001
145 Mail-GcalReminder # 0.1
146 DBIx-Class-IndexSearch-Dezi # 0.05
148 HTML-Zoom-Parser-HH5P # 0.002
150 # TODO: broken prereqs
151 Dancer-Plugin-FontSubset # 0.1.2 - Font::TTF::Scripts::Name
153 # TODO: broken by perl 5.18
154 App-DBCritic # 0.020 - smartmatch (GH #9)
155 App-OS-Detect-MachineCores # 0.038 - smartmatch (rt#88855)
156 Authen-HTTP-Signature # 0.02 - smartmatch (rt#88854)
157 DBICx-Backend-Move # 1.000010 - smartmatch (rt#88853)
158 Ruby-VersionManager # 0.004003 - smartmatch (rt#88852)
159 Text-Keywords # 0.900 - smartmatch (rt#84339)
160 Log-Message-Structured-Stringify-AsSereal # 0.10 - hash order (GH #1)
161 WebService-HabitRPG # 0.21 - smartmatch (rt#88399)
162 App-Rssfilter # 0.03 - smartmatch (GH #2)
163 Net-Icecast2 # 0.005 - hash order via PHP::HTTPBuildQuery (rt#81570)
164 POE-Component-ProcTerminator # 0.03 - hash order via Log::Fu (rt#88851)
166 # TODO: broken by Regexp::Grammars (perl 5.18)
169 Org-To-HTML # 0.07 - via Language::Expr
170 Perinci-Access-Simple-Server # 0.12
171 Perinci-CmdLine # 0.85 - via Data::Sah
172 Perinci-To-Text # 0.22 - via Data::Sah
173 Perinci-Sub-To-Text # 0.24 - via Data::Sah
174 Finance-Bank-ID-BCA # 0.26 - via Perinci::CmdLine
175 Software-Release-Watch # 0.01 - via Data::Sah, Perinci::CmdLine
176 Software-Release-Watch-SW-wordpress # 0.01 - via Software::Release::Watch
178 # SKIP: invalid prereqs
179 Catmandu-Z3950 # 0.03 - ZOOM missing
180 Dancer2-Session-JSON # 0.001 - Dancer2 bad version requirement
183 GeoIP2 # 0.040000 - prereq Math::Int128 (requires gcc 4.4)
184 Graphics-Potrace # 0.72 - external dependency
185 GraphViz2 # 2.19 - external dependency
186 Linux-AtaSmart # OS specific
187 MaxMind-DB-Reader # 0.040003 - prereq Math::Int128 (requires gcc 4.4)
188 MaxMind-DB-Common # 0.031002 - prereq Math::Int128 (requires gcc 4.4)
189 Net-Works # 0.12 - prereq Math::Int128 (requires gcc 4.4)
190 PortageXS # 0.3.1 - external dependency and broken prereq (Shell::EnvImporter)
191 XML-GrammarBase # v0.2.2 - prereq XML::LibXSLT (hard to install)
192 Forecast-IO # 0.21 - interactive tests
193 Net-OpenVPN-Launcher # 0.1 - external dependency (and broken test)
194 App-PerlWatcher-Level # 0.13 - depends on Linux::Inotify2
195 Graph-Easy-Marpa # 2.00 - GraphVis2
196 Net-OAuth-LP # 0.016 - relies on external service
197 Message-Passing-ZeroMQ # 0.007 - external dependency
198 Net-Docker # 0.002003 - external dependency
200 # TODO: broken by Moo change
201 Math-Rational-Approx # RT#84035
202 App-Services # RT#85255
203 Hg-Lib # pending release