X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMoose.git;a=blobdiff_plain;f=xt%2Fauthor%2Ftest-my-dependents.t;h=92b2112b5ba45dc5b8aef257cf25ec00aa498e9f;hp=480b3d521edddec80a1fadb2d585e92a93e25b9e;hb=106c1020f765a2b11fb0ce4c352ea497dfabf067;hpb=cdb8d8b2dd2ad1903c536efb1e4f18f82295fa25 diff --git a/xt/author/test-my-dependents.t b/xt/author/test-my-dependents.t index 480b3d5..92b2112 100644 --- a/xt/author/test-my-dependents.t +++ b/xt/author/test-my-dependents.t @@ -5,15 +5,33 @@ use Cwd qw( abs_path ); use Test::More; BEGIN { - plan skip_all => 'This test will not run unless you set MOOSE_TEST_MD to a true value' + my $help = <<'EOF'; + + + 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). + + MooseX Test all Moose extension distros + (MooseX modules plus a few others). + + $true Any other true value runs the default tests. We pick 200 random + distros and test them. + +EOF + + plan skip_all => $help unless $ENV{MOOSE_TEST_MD}; } use Test::Requires { - 'Archive::Zip' => 0, # or else .zip dists won't be able to be installed - 'Test::DependentModules' => '0.09', # skip all if not installed - 'MetaCPAN::API' => '0.33', + 'Archive::Zip' => 0, # or else .zip dists won't be able to be installed + 'Test::DependentModules' => '0.13', + 'MetaCPAN::API' => '0.33', }; + use Test::DependentModules qw( test_module ); use DateTime; @@ -23,7 +41,7 @@ use Moose (); diag( 'Test run performed at: ' . DateTime->now . ' with Moose ' - . Moose->VERSION ); + . (Moose->VERSION || 'git repo') ); $ENV{PERL_TEST_DM_LOG_DIR} = abs_path('.'); delete @ENV{ qw( AUTHOR_TESTING RELEASE_TESTING SMOKE_TESTING ) }; @@ -51,50 +69,25 @@ my $res = $mcpan->post( } ); -my %todo_reasons = map { - chomp; - /^(\S*)\s*(?:#\s*(.*)\s*)?$/; - defined($1) && length($1) ? ($1 => $2) : () -} ; -my %todo = map { $_ => 1 } keys %todo_reasons; - my @skip_prefix = qw(Acme Task Bundle); -my %skip = map { $_ => 1 } ( - 'App-CPAN2Pkg', # tk tests are graphical - 'App-USBKeyCopyCon', # gtk tests are graphical - 'Bot-Backbone', # poe-loop-ev prompts - 'Cache-Ehcache', # hangs if server exists on port 8080 - 'CatalystX-Restarter-GTK', # gtk tests are graphical - 'CM-Permutation', # OpenGL uses graphics in Makefile.PL - 'Dackup', # depends on running ssh - 'Data-Collector', # depends on running ssh - 'Date-Biorhythm', # Date::Business prompts in Makefile.PL - 'DBIx-PgLink', # prompts for a postgres password - 'Forest-Tree-Viewer-Gtk2', # gtk tests are graphical - 'Games-Pandemic', # tk tests are graphical - 'Games-RailRoad', # tk tests are graphical - 'Games-Risk', # tk tests are graphical - 'Gearman-Driver', # spews tar errors - 'helm', # depends on running ssh - 'iTransact-Lite', # tests rely on internet site - 'Log-Dispatch-Gtk2-Notify', # gtk tests are graphical - 'LPDS', # gtk tests are graphical - 'Net-SFTP-Foreign-Exceptional', # depends on running ssh - 'Periscope', # gtk tests are graphical - 'POE-Component-OpenSSH', # depends on running ssh - 'POE-Component-Server-SimpleHTTP-PreFork', # ipc::shareable tests hang - 'RDF-TrineX-RuleEngine-Jena', # prompts in Makefile.PL - 'Test-SFTP', # Term::ReadPassword prompts in tests - 'Tk-Role-Dialog', # tk tests are graphical - 'Unicode-Emoji-E4U', # tests rely on internet site - 'Weaving-Tablet', # tk tests are graphical - 'WWW-eNom', # tests rely on internet site - 'WWW-Finances-Bovespa', # tests rely on internet site - 'WWW-Hashdb', # test hangs, pegging cpu - 'WWW-Vimeo-Download', # tests rely on internet site - 'WWW-YouTube-Download-Channel', # tests rely on internet site - 'Zucchini', # File::Rsync prompts in Makefile.PL -); +my %skip; +my %todo; + +my $hash; +for my $line () { + chomp $line; + next unless $line =~ /\S/; + if ( $line =~ /^# (\w+)/ ) { + die "Invalid action in DATA section ($1)" + unless $1 eq 'SKIP' || $1 eq 'TODO'; + $hash = $1 eq 'SKIP' ? \%skip : \%todo; + } + + my ( $dist, $reason ) = $line =~ /^(\S*)\s*(?:#\s*(.*)\s*)?$/; + next unless defined $dist && length $dist; + + $hash->{$dist} = $reason; +} my %name_fix = ( 'App-passmanager' => 'App::PassManager', @@ -120,19 +113,36 @@ my %name_fix = ( 'X11-XCB' => 'X11::XCB::Connection', 'XML-Ant-BuildFile' => 'XML::Ant::BuildFile::Project', ); + my @dists = sort grep { !$skip{$_} } grep { my $dist = $_; !any { $dist =~ /^$_-/ } @skip_prefix } map { $_->{fields}{distribution} } @{ $res->{hits}{hits} }; +if ( $ENV{MOOSE_TEST_MD} eq 'MooseX' ) { + @dists = grep { /^(?:MooseX-|Fey-ORM)/ } @dists; +} +elsif ( $ENV{MOOSE_TEST_MD} ne 'all' ) { + diag( + 'Picking 200 random dependents to test. Set MOOSE_TEST_MD=all to test all dependents' + ); + + my %indexes; + while ( keys %indexes < 200 ) { + $indexes{ int rand( scalar @dists ) } = 1; + } + + @dists = @dists[ sort keys %indexes ]; +} + plan tests => scalar @dists; for my $dist (@dists) { note($dist); my $module = $dist; $module = $name_fix{$module} if exists $name_fix{$module}; if ($todo{$dist}) { - my $reason = $todo_reasons{$dist}; + my $reason = $todo{$dist}; $reason = '???' unless defined $reason; local $TODO = $reason; eval { test_module($module); 1 } @@ -145,12 +155,13 @@ for my $dist (@dists) { } __DATA__ -# indexing issues (test::dm bugs?) +# SKIP: indexing issues (test::dm bugs?) Alice # couldn't find on cpan Hopkins # couldn't find on cpan PostScript-Barcode # couldn't find on cpan +WWW-Mechanize-Query # couldn't find on cpan -# doesn't install deps properly (test::dm bugs?) +# SKIP: doesn't install deps properly (test::dm bugs?) App-Benchmark-Accessors # Mojo::Base isn't installed Bot-BasicBot-Pluggable # Crypt::SaltedHash isn't installed Code-Statistics # MooseX::HasDefaults::RO isn't installed @@ -165,8 +176,9 @@ mobirc # HTTP::Session::State::GUID isn't instal Net-Bamboo # XML::Tidy isn't installed Tatsumaki-Template-Markapl # Tatsumaki::Template isn't installed Text-Tradition # Bio::Phylo::IO isn't installed +WebService-Strava # Any::URI::Escape isn't installed -# no tests +# SKIP: no tests AI-ExpertSystem-Advanced # no tests API-Assembla # no tests App-mkfeyorm # no tests @@ -199,6 +211,7 @@ Kafka-Client # no tests LWP-UserAgent-OfflineCache # no tests Markdown-Pod # no tests MooseX-Types-DateTimeX # no tests +MooseX-Types-DateTime-MoreCoercions # no tests unless DateTime::Format::DateManip is installed Net-Azure-BlobService # no tests Net-Dropbox # no tests Net-Flowdock # no tests @@ -220,7 +233,8 @@ WebService-CloudFlare-Host # no tests WWW-MenuGrinder # no tests WWW-WuFoo # no tests -# external dependencies +# SKIP: external dependencies +AnyEvent-MSN # requires Net::SSLeay (which requires libssl) AnyEvent-Multilog # requires multilog AnyEvent-Net-Curl-Queued # requires libcurl AnyEvent-ZeroMQ # requires zeromq installation @@ -262,6 +276,7 @@ MongoDB # requires mongo MSWord-ToHTML # requires abiword to be installed Net-DBus-Skype # requires dbus Net-Route # requires route +Net-SFTP-Foreign-Exceptional # depends on running ssh Net-UpYun # requires curl Net-ZooTool # requires curl Nginx-Control # requires nginx to be installed @@ -290,7 +305,7 @@ WWW-Curl-Simple # requires curl ZeroMQ-PubSub # requires zmq ZMQ-Declare # requires zmq -# flaky internet tests +# SKIP: flaky internet tests iTransact-Lite # tests rely on internet site Unicode-Emoji-E4U # tests rely on internet site WWW-eNom # tests rely on internet site @@ -298,7 +313,7 @@ WWW-Finances-Bovespa # tests rely on internet site WWW-Vimeo-Download # tests rely on internet site WWW-YouTube-Download-Channel # tests rely on internet site -# graphical +# SKIP: graphical App-CPAN2Pkg # tk tests are graphical App-USBKeyCopyCon # gtk tests are graphical CatalystX-Restarter-GTK # gtk tests are graphical @@ -312,7 +327,17 @@ Periscope # gtk tests are graphical Tk-Role-Dialog # tk tests are graphical Weaving-Tablet # tk tests are graphical -# failing for a reason +# SKIP: prompts (or a dep prompts) or does something else dumb +Bot-Backbone # poe-loop-ev prompts +Cache-Ehcache # hangs if server exists on port 8080 +CM-Permutation # OpenGL uses graphics in Makefile.PL +Date-Biorhythm # Date::Business prompts in Makefile.PL +Gearman-Driver # spews tar errors +Net-SSH-Mechanize # the mock-ssh script it runs seems to spin endlessly +WWW-Hashdb # test hangs, pegging cpu +Zucchini # File::Rsync prompts in Makefile.PL + +# TODO: failing for a reason Algorithm-KernelKMeans # mx-types-common changes broke it AnyEvent-BitTorrent # broken AnyEvent-Cron # intermittent failures @@ -334,8 +359,6 @@ App-Twimap # dep on Web::oEmbed::Common App-Validation-Automation # dep on Switch App-Wubot # broken Beagle # depends on term::readline::perl -Bot-Backbone # poe-loop-ev prompts -Cache-Ehcache # hangs if server exists on port 8080 Cache-Profile # broken Catalyst-Authentication-Store-LDAP-AD-Class # pod coverage fail Catalyst-Controller-Resources # broken @@ -352,7 +375,6 @@ CatalystX-SimpleLogin # broken CatalystX-Usul # proc::processtable doesn't load Cheater # parse::randgen is broken Class-OWL # uses CMOP::Class without loading cmop -CM-Permutation # OpenGL uses graphics in Makefile.PL Cogwheel # uses ancient moose apis Config-Model # broken Config-Model-Backend-Augeas # deps on Config::Model @@ -368,7 +390,6 @@ Data-Feed # broken (only sometimes?) Data-PackageName # broken Data-Pipeline # uses ancient moose apis Data-SCORM # pod coverage fail -Date-Biorhythm # Date::Business prompts in Makefile.PL DayDayUp # MojoX-Fixup-XHTML doesn't exist DBICx-Modeler-Generator # broken (weirdly) DBIx-SchemaChecksum # broken @@ -388,7 +409,8 @@ File-Tail-Dir # intermittent fails (i think) Form-Factory # uses old moose apis FormValidator-Nested # broken Frost # broken -Gitalist # deps on mxms +Games-Dice-Loaded # flaky tests +Gitalist # broken GOBO # coerce with no coercion Google-Chart # recreating type constraints Google-Spreadsheet-Agent # pod::coverage fail @@ -418,9 +440,9 @@ MooseX-Error-Exception-Class # metaclass compat breakage MooseX-Getopt-Usage # missing dep on Test::Class MooseX-Meta-Attribute-Index # old moose apis MooseX-Meta-Attribute-Lvalue # old moose apis -MooseX-Method-Signatures # broken MooseX-Struct # ancient moose apis MooseX-Types-Parameterizable # broken +MooseX-WithCache # broken MouseX-Types # broken (with moose) MySQL-Util # pod-coverage fail Nagios-Passive # broken @@ -438,6 +460,7 @@ Net-Parliament # broken Net-Plurk # broken Net-SSLeay-OO # broken Net-StackExchange # broken +Norma # fails when trying to write to a read-only SQLite db file under jenkins, also fails when run manually ODG-Record # Test::Benchmark broken Perlbal-Control # proc::processtable doesn't load Pg-BulkCopy # hardcodes /usr/bin/perl @@ -451,6 +474,7 @@ POE-Component-DirWatch-Object # intermittent failures POE-Component-ResourcePool # broken POE-Component-Server-PSGI # broken deps POE-Component-Server-SimpleHTTP-PreFork # broken deps +Poet # missing dep on Log::Any::Adapter::Log4perl POEx-ProxySession # broken deps POEx-PubSub # broken deps POEx-WorkerPool # broken deps @@ -471,6 +495,7 @@ Shipment # locale::subcountry is broken Silki # image::magick is broken SilkiX-Converter-Kwiki # file::mimeinfo expects (?-xism: Sloth # rest::utils is broken +Sque # couldn't fork server for testing SRS-EPP-Proxy # depends on xml::epp String-Blender # broken TAEB # broken @@ -498,10 +523,9 @@ Webservice-Intermine # broken tests WebService-Yes24 # broken WiX3 # broken WWW-Alltop # XML::SimpleObject configure fail -WWW-DataWiki # depends on mxms +WWW-DataWiki # broken WWW-Fandango # bad dist WWW-FMyLife # broken -WWW-Hashdb # test hangs, pegging cpu WWW-Mechanize-Cached # tries to read from wrong build dir? WWW-Metalgate # Cache is broken WWW-Scramble # pod::coverage fail @@ -514,4 +538,3 @@ XML-EPP # coerce without coercion XML-SRS # deps on prang XML-Writer-Compiler # broken tests Yukki # git::repository is broken -Zucchini # File::Rsync prompts in Makefile.PL