X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=Makefile.PL;h=ecb51d7980069b376d3ad71a3a01f8226f275420;hb=3c429663cc970c2f17a5d1a5f64b4694ce3eb7b0;hp=3170ceeadad03edad1ff92437347734f4882fc00;hpb=1397be4ce6f4b9259658237cf7cfb595358c4b44;p=gitmo%2FMouse.git diff --git a/Makefile.PL b/Makefile.PL index 3170cee..ecb51d7 100755 --- a/Makefile.PL +++ b/Makefile.PL @@ -24,6 +24,7 @@ if ($Module::Install::AUTHOR) { } else { print "you don't have a moose. skipping moose compatibility test\n"; } + system("author/generate-mouse-tiny.pl"); } auto_include; @@ -34,37 +35,42 @@ sub create_moose_compatibility_test { require File::Spec; require File::Basename; + print "Creating xt/compatibility/* ...\n"; + # some test does not pass... currently skip it. my %SKIP_TEST = ( '016-trigger.t' => "trigger's argument is incompatble :(", '020-load-class.t' => "&Moose::is_class_loaded doesn't exists", '019-handles.t' => 'incompatible', - '025-more-isa.t' => 'Class::MOP::is_class_loaded is not compatible with Mouse::is_class_loaded', '029-new.t' => 'Class->new(undef) incompatible', '010-isa-or.t' => 'Mouse has a [BUG]', '044-attribute-metaclass.t' => 'Moose::Meta::Attribute does not have a "create"', '047-attribute-metaclass-role.t' => 'Moose::Meta::Attribute does not have a "create"', '201-squirrel.t' => 'skip Squirrel', '202-squirrel-role.t' => 'Squirrel is ...', - '400-define-role.t' => 'incompatibility', '600-tiny-tiny.t' => "Moose doesn't support ::Tiny", '601-tiny-mouse.t' => "Moose doesn't support ::Tiny", '602-mouse-tiny.t' => "Moose doesn't support ::Tiny", - '031_roles_applied_in_create.t' => 'wtf?', + '031_roles_applied_in_create.t' => 't/lib/* classes are not Moose classes/roles', ); + my @compat_tests; + File::Find::find( { wanted => sub { return unless -f $_; + + return if /failing/; # skip tests in failing/ directories + my $basename = File::Basename::basename($_); return if $basename =~ /^\./; return if $SKIP_TEST{$basename}; - + my $dirname = File::Basename::dirname($_); my $tmpdir = File::Spec->catfile('xt', 'compatibility', $dirname); - File::Path::make_path($tmpdir); + File::Path::mkpath($tmpdir); my $tmpfile = File::Spec->catfile($tmpdir, $basename); open my $wfh, '>', $tmpfile or die $!; @@ -80,10 +86,12 @@ sub create_moose_compatibility_test { $src; }; close $wfh; + push @compat_tests, $tmpfile; }, no_chdir => 1 }, 't', ); + clean_files "@compat_tests"; }