From: Graham Knop Date: Mon, 13 May 2013 22:22:05 +0000 (-0400) Subject: skip prereq tests on some problematic modules and know broken modules X-Git-Tag: v1.003000~63 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4c58e02001de5330da7489d7d96ee3f2dcee204e;p=gitmo%2FMoo.git skip prereq tests on some problematic modules and know broken modules --- diff --git a/xt/test-my-dependents.t b/xt/test-my-dependents.t index 420fb99..303a6ae 100644 --- a/xt/test-my-dependents.t +++ b/xt/test-my-dependents.t @@ -22,6 +22,9 @@ use Test::DependentModules qw( test_modules ); use MetaCPAN::API; use List::Util (); +# avoid any modules that depend on these +my @bad_prereqs = qw(Gtk2 Padre Wx); + my $mcpan = MetaCPAN::API->new; my $res = $mcpan->post( '/search/reverse_dependencies/Moo' => { @@ -32,20 +35,26 @@ my $res = $mcpan->post( and => [ { term => { 'release.status' => 'latest' } }, { term => { 'release.authorized' => \1 } }, + { not => { filter => { + or => [ + map { { term => { 'dependency.module' => $_ } } } @bad_prereqs, + ], + } } } ], }, }, }, size => 5000, - fields => ['distribution', 'provides'], + fields => ['distribution', 'provides', 'metadata.provides'], }, ); my %bad_module; foreach my $line () { chomp $line; - if ($line =~ /^\s*(\S+)\s*(#|$)/) { - $bad_module{$1}++; + if ($line =~ /^\s*(\S+)?\s*(#|$)/) { + $bad_module{$1}++ + if $1; } else { die "Invalid entry in DATA section: $line"; @@ -56,6 +65,9 @@ my @modules = sort grep !/^(?:Task|Bundle|Acme)::/, grep !$bad_module{$_}, map { if (my $provides = $_->{fields}{provides}) { ref $provides ? (sort @$provides)[0] : $provides; } + elsif (my $provides = $_->{fields}{'metadata.provides'}) { + (sort keys %$provides)[0]; + } else { my $dist = $_->{fields}{distribution}; $dist =~ s/-/::/g; @@ -86,5 +98,47 @@ plan tests => scalar @modules; test_modules(@modules); __DATA__ +# no tests +CPAN::Mirror::Finder +Catmandu::AlephX +Device::Hue +Novel::Robot +Novel::Robot::Browser +Novel::Robot::Parser +Thrift::API::HiveClient +Tiezi::Robot::Parser + # broken +App::Presto +Catmandu::Store::Lucy +Dancer2::Session::Sereal +Data::Localize +HTML::Zoom::Parser::HH5P +Message::Passing::ZeroMQ +Tak + +# broken tests +Template::Flute +Uninets::Check::Modules::HTTP +Uninets::Check::Modules::MongoDB +Uninets::Check::Modules::Redis + +# missing prereqs +Catmandu::Z3950 +Tiezi::Robot + +# bad prereq version listed +Dancer2::Session::Cookie +Dancer2::Session::JSON + +# broken, pending release +Hg::Lib +P9Y::ProcessTable +Net::Easypost + +# OS specific +Linux::AtaSmart + +# broken by Moo change, reported rt#84035 +Math::Rational::Approx