fixed in test::dm
[gitmo/Moose.git] / xt / author / test-my-dependents.t
1 use strict;
2 use warnings;
3
4 use Cwd qw( abs_path );
5 use Test::More;
6
7 BEGIN {
8     plan skip_all => 'This test will not run unless you set MOOSE_TEST_MD to a true value'
9         unless $ENV{MOOSE_TEST_MD};
10 }
11
12 use Test::Requires {
13     'Archive::Zip' => 0, # or else .zip dists won't be able to be installed
14     'Test::DependentModules' => '0.09', # skip all if not installed
15     'MetaCPAN::API' => '0.33',
16 };
17 use Test::DependentModules qw( test_module );
18
19 use DateTime;
20 use List::MoreUtils qw(any);
21 use Moose ();
22
23 diag(     'Test run performed at: '
24         . DateTime->now
25         . ' with Moose '
26         . Moose->VERSION );
27
28 $ENV{PERL_TEST_DM_LOG_DIR} = abs_path('.');
29 delete @ENV{ qw( AUTHOR_TESTING RELEASE_TESTING SMOKE_TESTING ) };
30
31 $ENV{ANY_MOOSE} = 'Moose';
32
33 my $mcpan = MetaCPAN::API->new;
34 my $res = $mcpan->post(
35     '/release/_search' => {
36         query  => { match_all => {} },
37         size   => 5000,
38         filter => { and => [
39             { or => [
40                 { term => { 'release.dependency.module' => 'Moose' } },
41                 { term => { 'release.dependency.module' => 'Moose::Role' } },
42                 { term => { 'release.dependency.module' => 'Moose::Exporter' } },
43                 { term => { 'release.dependency.module' => 'Class::MOP' } },
44                 { term => { 'release.dependency.module' => 'MooseX::Role::Parameterized' } },
45                 { term => { 'release.dependency.module' => 'Any::Moose' } },
46             ] },
47             { term => { 'release.status'   => 'latest' } },
48             { term => { 'release.maturity' => 'released' } },
49         ] },
50         fields => 'distribution'
51     }
52 );
53
54 my %todo_reasons = map {
55     chomp;
56     /^(\S*)\s*(?:#\s*(.*)\s*)?$/;
57     defined($1) && length($1) ? ($1 => $2) : ()
58 } <DATA>;
59 my %todo = map { $_ => 1 } keys %todo_reasons;
60
61 my @skip_prefix = qw(Acme Task Bundle);
62 my %skip = map { $_ => 1 } (
63     'Dackup',                       # depends on running ssh
64     'Data-Collector',               # depends on running ssh
65     'Date-Biorhythm',               # Date::Business prompts in Makefile.PL
66     'helm',                         # depends on running ssh
67     'Net-SFTP-Foreign-Exceptional', # depends on running ssh
68     'POE-Component-OpenSSH',        # depends on running ssh
69     'Test-SFTP',                    # Term::ReadPassword prompts in tests
70     'WWW-Hashdb',                   # test hangs, pegging cpu
71     'Zucchini',                     # File::Rsync prompts in Makefile.PL
72 );
73
74 my %name_fix = (
75     'App-PipeFilter'                 => 'App::PipeFilter::Generic',
76     'Constructible'                  => 'Constructible::Maxima',
77     'DCOLLINS-ANN-Locals'            => 'DCOLLINS::ANN::Robot',
78     'Dist-Zilla-Deb'                 => 'Dist::Zilla::Plugin::Deb::VersionFromChangelog',
79     'Dist-Zilla-Plugin-TemplateFile' => 'Dist::Zilla::Plugin::TemplateFiles',
80     'Dist-Zilla-Plugins-CJM'         => 'Dist::Zilla::Plugin::TemplateCJM',
81     'OWL-Simple'                     => 'OWL::Simple::Class',
82     'Patterns-ChainOfResponsibility' => 'Patterns::ChainOfResponsibility::Application',
83     'Role-Identifiable'              => 'Role::Identifiable::HasIdent',
84     'X11-XCB'                        => 'X11::XCB::Connection',
85     'XML-Ant-BuildFile'              => 'XML::Ant::BuildFile::Project',
86     'helm'                           => 'Helm',
87     'marc-moose'                     => 'MARC::Moose',
88     'mobirc'                         => 'App::Mobirc',
89     'smokebrew'                      => 'App::SmokeBrew',
90     'v6-alpha'                       => 'v6',
91 );
92 my @modules = map  { exists $name_fix{$_} ? $name_fix{$_} : $_ }
93               sort
94               grep { !$skip{$_} }
95               grep { my $dist = $_; !any { $dist =~ /^$_-/ } @skip_prefix }
96               map  { $_->{fields}{distribution} }
97               @{ $res->{hits}{hits} };
98
99 plan tests => scalar @modules;
100 for my $module (@modules) {
101     diag($module);
102     if ($todo{$module}) {
103         my $reason = $todo_reasons{$module};
104         $reason = '???' unless defined $reason;
105         local $TODO = $reason;
106         eval { test_module($module); 1 }
107             or fail("Died when testing $module: $@");
108     }
109     else {
110         eval { test_module($module); 1 }
111             or fail("Died when testing $module: $@");
112     }
113 }
114
115 __DATA__
116 # not in cpan index
117 Black-Board                            # not found on cpan because of mxd
118 Hopkins                                # not found on cpan (?)
119 PostScript-Barcode                     # not found on cpan (?)
120 VirtualBox-Manage                      # not found on cpan because of mxd
121
122 # no tests
123 AI-ExpertSystem-Advanced
124 API-Assembla
125 App-mkfeyorm
126 Bot-Applebot
127 Catalyst-Authentication-Credential-Facebook-OAuth2
128 Catalyst-Authentication-Store-Fey-ORM
129 Catalyst-Controller-MovableType
130 Catalyst-Model-MenuGrinder
131 Chef
132 Data-SearchEngine-ElasticSearch
133 Dist-Zilla-Plugin-DualLife
134 Dist-Zilla-Plugin-GitFlow
135 Dist-Zilla-Plugin-MetaResourcesFromGit
136 Dist-Zilla-Plugin-Rsync
137 Dist-Zilla-PluginBundle-ARODLAND
138 Dist-Zilla-PluginBundle-Author-OLIVER
139 Dist-Zilla-PluginBundle-NUFFIN
140 Games-HotPotato
141 Kafka-Client
142 LWP-UserAgent-OfflineCache
143 Net-Dropbox
144 Net-Recurly
145 Pod-Weaver-Section-Encoding
146 POE-Component-Server-MySQL
147 Random-Quantum
148 SchemaEvolution
149 STD
150 Test-System
151 WebService-Buxfer
152 WebService-CloudFlare-Host
153 WWW-MenuGrinder
154
155 # failing for a reason
156 Algorithm-KernelKMeans                 # mx-types-common changes broke it
157 Alien-ActiveMQ                         # can't install activemq
158 AnyEvent-Inotify-Simple                # ??? (maybe issue with test::sweet)
159 AnyEvent-JSONRPC                       # tests require recommended deps
160 AnyEvent-Retry                         # mx-types-common changes broke it
161 AnyEvent-ZeroMQ                        # requires zeromq installation
162 App-CPAN2Pkg                           # Tk doesn't compile
163 App-Dataninja                          # bad M::I install in inc/
164 App-ForExample                         # getopt::chain is broken
165 App-Fotagger                           # Imager doesn't compile
166 App-HistHub                            # missing dep on JSON.pm
167 App-Magpie                             # deps on URPM which doesn't exist
168 App-PgCryobit                          # requires postgres installation
169 App-TemplateServer                     # broken use of types
170 App-TemplateServer-Provider-HTML-Template  # dep on app-templateserver
171 App-TemplateServer-Provider-Mason      # dep on app-templateserver
172 App-TemplateServer-Provider-TD         # dep on app-templateserver
173 App-TimeTracker                        # git::repository is broken
174 App-USBKeyCopyCon                      # gtk tests are graphical
175 Archive-RPM                            # requires cpio
176 Bio-MAGETAB                            # datetime-format-datemanip is broken
177 Bot-Backbone                           # broken deps
178 Business-UPS-Tracking                  # broken
179 Cache-Profile                          # broken
180 Catalyst-Authentication-Store-LDAP-AD-Class  # pod coverage fail
181 Catalyst-Controller-Resources          # broken
182 Catalyst-Engine-Stomp                  # requires alien::activemq
183 Catalyst-Model-Search-ElasticSearch    # requires elasticsearch
184 Catalyst-Model-Sedna                   # deps on Alien-Sedna which doesn't exist
185 Catalyst-Plugin-Continuation           # undeclared dep
186 Catalyst-Plugin-ErrorCatcher-ActiveMQ-Stomp  # pod coverage fail
187 Catalyst-Plugin-SwiffUploaderCookieHack  # undeclared dep
188 Catalyst-TraitFor-Component-ConfigPerSite  # undeclared dep
189 Catalyst-TraitFor-Controller-jQuery-jqGrid  # bad test (missing files)
190 CatalystX-MooseComponent               # broken
191 CatalystX-Restarter-GTK                # gtk tests are graphical
192 CatalystX-RoleApplicator               # broken
193 CatalystX-SimpleAPI                    # depends on ::RoleApplicator
194 CatalystX-SimpleLogin                  # broken
195 CatalystX-Usul                         # proc::processtable doesn't load
196 Cave-Wrapper                           # requires cave to be installed
197 Cheater                                # parse::randgen is broken
198 CHI-Driver-Redis                       # requires redis server
199 Class-OWL                              # uses CMOP::Class without loading cmop
200 CM-Permutation                         # OpenGL uses graphics in Makefile.PL
201 Cogwheel                               # uses ancient moose apis
202 Constructible                          # GD::SVG is a broken dist
203 Coro-Amazon-SimpleDB                   # amazon::simpledb::client doesn't exist
204 CPAN-Digger                            # requires DBD::SQLite
205 CPAN-Mini-Webserver                    # undeclared dep on lingua-stopwords
206 CPAN-Patches-Plugin-Debian             # configure time failures
207 Dackup                                 # depends on running ssh
208 Data-Apache-mod_status                 # invalid characters in type name
209 Data-Collector                         # depends on running ssh
210 Data-PackageName                       # broken
211 Data-Pipeline                          # uses ancient moose apis
212 Date-Biorhythm                         # Date::Business prompts in Makefile.PL
213 DayDayUp                               # MojoX-Fixup-XHTML doesn't exist
214 DBICx-Modeler-Generator                # broken (weirdly)
215 DBIx-PgLink                            # requires postgres installation
216 DBIx-SchemaChecksum                    # broken
217 Debian-Apt-PM                          # configure time failures
218 Devel-Events                           # broken (role conflict)
219 Dist-Zilla-Plugin-ProgCriticTests      # broken
220 Dist-Zilla-Plugin-SVK                  # requires svn bindings
221 DustyDB                                # uses old moose apis
222 ELF-Extract-Sections                   # uses stash entries with ::
223 ETLp                                   # uses stash entries with ::
224 Fedora-App-MaintainerTools             # requires rpm to be installed
225 Fedora-App-ReviewTool                  # requires koji to be installed
226 FFmpeg-Thumbnail                       # undeclared dep
227 File-DataClass                         # XML::DTD is a broken dist
228 Finance-Bank-SentinelBenefits-Csv401kConverter  # uses stash entries with ::
229 Forest-Tree-Viewer-Gtk2                # gtk tests are graphical
230 Form-Factory                           # uses old moose apis
231 Frost                                  # broken
232 Games-Pandemic                         # tk doesn't build
233 Games-RailRoad                         # tk doesn't build
234 Games-Risk                             # tk doesn't build
235 Games-Tetris-Complete                  # requires threads
236 Getopt-Chain                           # p::d::builder changed dists
237 GOBO                                   # coerce with no coercion
238 Google-Spreadsheet-Agent               # pod::coverage fail
239 helm                                   # depends on running ssh
240 Hobocamp                               # configure_requires needs EU::CChecker
241 Horris                                 # App::Horris isn't on cpan
242 HTML-TreeBuilderX-ASP_NET              # broken
243 IM-Engine-Plugin-Dispatcher            # p::d::declarative changed dists
244 JavaScript-Framework-jQuery            # coerce with no coercion
245 Jungle                                 # broken
246 Kamaitachi                             # pod::coverage fail
247 KiokuDB-Backend-Files                  # broken
248 Lingua-TreeTagger                      # requires treetagger to be installed
249 Locale-MO-File                         # broken
250 Log-Dispatch-Gtk2-Notify               # gtk tests are graphical
251 Mail-Summary-Tools                     # DT::Format::DateManip is broken
252 MediaWiki-USERINFO                     # broken
253 Mildew                                 # regexp::grammars needs class::accessor
254 mobirc                                 # http::engine broken
255 MooseX-Attribute-Prototype             # uses old moose apis
256 MooseX-DBIC-Scaffold                   # needs unreleased sql-translator
257 MooseX-Documenter                      # broken
258 MooseX-DOM                             # "no Moose" unimports confess
259 MooseX-Error-Exception-Class           # metaclass compat breakage
260 MooseX-Meta-Attribute-Index            # old moose apis
261 MooseX-Meta-Attribute-Lvalue           # old moose apis
262 MooseX-Struct                          # ancient moose apis
263 MooseX-TrackDirty-Attributes           # old moose apis
264 MSWord-ToHTML                          # requires abiword to be installed
265 namespace-alias                        # won't compile
266 Net-Douban                             # broken
267 Net-FluidDB                            # broken
268 Net-Fluidinfo                          # broken
269 NetHack-Item                           # NH::Monster::Spoiler is broken
270 NetHack-Monster-Spoiler                # broken (MX::CA issues)
271 Net-HTTP-Factual                       # broken
272 Net-Journyx                            # broken
273 Net-Parliament                         # broken
274 Net-Plurk                              # broken
275 Net-StackExchange                      # broken
276 Nginx-Control                          # requires nginx to be installed
277 ODG-Record                             # Test::Benchmark broken
278 Paludis-UseCleaner                     # needs cave::wrapper
279 Parse-FixedRecord                      # broken
280 Perlanet                               # HTML::Tidy requires tidyp
281 Perlbal-Control                        # proc::processtable doesn't load
282 Perl-Dist-Strawberry-BuildPerl-5123    # windows only
283 Perl-Dist-WiX-BuildPerl-5123           # windows only
284 Perl-Dist-WiX                          # windows only
285 Pg-BulkCopy                            # hardcodes /usr/bin/perl
286 POE-Component-CPAN-Mirror-Multiplexer  # broken
287 POE-Component-DirWatch-Object          # broken
288 POE-Component-OpenSSH                  # depends on running ssh
289 POE-Component-ResourcePool             # broken
290 POE-Component-Server-PSGI              # broken deps
291 POE-Component-Server-SimpleHTTP-PreFork  # broken deps
292 POEx-ProxySession                      # broken deps
293 POEx-PubSub                            # broken deps
294 POEx-WorkerPool                        # broken deps
295 Queue-Leaky                            # broken
296 RDF-Server                             # "no Moose" unimports confess
297 Reaction                               # signatures is broken
298 Reflexive-Role-Collective              # broken (reflex::role changes?)
299 Reflexive-Role-DataMover               # broken (reflex::role changes?)
300 Reflexive-Role-TCPServer               # broken (reflex::role changes?)
301 RPC-Any                                # broken
302 Scene-Graph                            # has '+attr' in roles
303 Server-Control                         # proc::processtable doesn't load
304 SilkiX-Converter-Kwiki                 # file::mimeinfo expects (?-xism:
305 SimpleDB-Class                         # requires memcached
306 SRS-EPP-Proxy                          # depends on xml::epp
307 String-Blender                         # broken
308 TAEB                                   # broken
309 Tail-Tool                              # Getopt::Alt doesn't exist
310 Tapper-Installer                       # sys::info::driver::linux is broken
311 Tapper-MCP-MessageReceiver             # sys::info::driver::linux is broken
312 Tapper-MCP                             # sys::info::driver::linux is broken
313 Tapper-Reports-API                     # sys::info::driver::linux is broken
314 Tapper-Testplan                        # sys::info::driver::linux is broken
315 Telephone-Mnemonic-US                  # rpm-build-perl is broken
316 Test-A8N                               # broken
317 Test-Daily                             # configure errors
318 Test-SFTP                              # Term::ReadPassword prompts in tests
319 Thorium                                # requires Hobocamp
320 Tk-Role-Dialog                         # tk won't compile
321 TryCatch-Error                         # broken
322 Verby                                  # requires poe::component::resourcepool
323 Weaving-Tablet                         # tk doesn't compile
324 WebService-SlimTimer                   # weird mxms error
325 WebService-Yes24                       # broken
326 WiX3                                   # broken
327 WWW-Alltop                             # XML::SimpleObject configure fail
328 WWW-Fandango                           # bad dist
329 WWW-FMyLife                            # broken
330 WWW-Hashdb                             # test hangs, pegging cpu
331 WWW-Metalgate                          # Cache is broken
332 WWW-Scramble                           # pod::coverage fail
333 WWW-StaticBlog                         # time::sofar is broken
334 WWW-Yahoo-Lyrics-JP                    # broken
335 XIRCD                                  # undeclared deps
336 XML-EPP                                # coerce without coercion
337 XML-LibXSLT-Easy                       # missing dep on mx-getopt
338 Yukki                                  # git::repository is broken
339 Zucchini                               # File::Rsync prompts in Makefile.PL