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