Move a number of tests to xt, restructure extra lists
[dbsrgits/DBIx-Class.git] / maint / Makefile.PL.inc / 11_authortests.pl
index e29b542..7760de2 100644 (file)
@@ -1,24 +1,21 @@
 require File::Spec;
 require File::Find;
 
-my $xt_dirs;
+my $xt_dist_dirs;
 File::Find::find(sub {
-  return if $xt_dirs->{$File::Find::dir};
-  $xt_dirs->{$File::Find::dir} = 1 if (
+  return if $xt_dist_dirs->{$File::Find::dir};
+  $xt_dist_dirs->{$File::Find::dir} = 1 if (
     $_ =~ /\.t$/ and -f $_
   );
-}, 'xt');
+}, 'xt/dist');
 
-my @xt_tests = map { File::Spec->catfile($_, '*.t') } sort keys %$xt_dirs;
-
-# this will add the xt tests to the `make test` target among other things
-Meta->tests(join (' ', map { $_ || () } Meta->tests, @xt_tests ) );
+my @xt_dist_tests = map { File::Spec->catfile($_, '*.t') } sort keys %$xt_dist_dirs;
 
 # inject an explicit xt test run, mainly to check the contents of
 # lib and the generated POD's *before* anything is copied around
 #
-# at the end rerun the whitespace test in the distdir, to make sure everything
-# is pristine
+# at the end rerun the whitespace and footer tests in the distdir
+# to make sure everything is pristine
 postamble <<"EOP";
 
 dbic_clonedir_copy_generated_pod : test_xt
@@ -34,18 +31,18 @@ test_xt : pm_to_blib
     # perl cmd
     join( ' ',
       '$(ABSPERLRUN)',
-      map { $mm_proto->quote_literal($_) } qw(-e $ENV{RELEASE_TESTING}=1;)
+      map { $mm_proto->quote_literal($_) } qw(-e $ENV{RELEASE_TESTING}=1;$ENV{DBICTEST_NO_MAKEFILE_VERIFICATION}=1;)
     ),
     # test list
     join( ' ',
-      map { $mm_proto->quote_literal($_) } @xt_tests
+      map { $mm_proto->quote_literal($_) } @xt_dist_tests
     ),
   )
 ]}
 
-create_distdir : dbic_distdir_retest_whitespace
+create_distdir : dbic_distdir_retest_ws_and_footers
 
-dbic_distdir_retest_whitespace :
+dbic_distdir_retest_ws_and_footers :
 \t@{[
   $mm_proto->cd (
     '$(DISTVNAME)',
@@ -55,7 +52,7 @@ dbic_distdir_retest_whitespace :
         '$(ABSPERLRUN)',
         map { $mm_proto->quote_literal($_) } qw(-Ilib -e $ENV{RELEASE_TESTING}=1;$ENV{DBICTEST_NO_MAKEFILE_VERIFICATION}=1;)
       ),
-      'xt/whitespace.t'
+      'xt/dist/postdistdir/*.t',
     )
   )
 ]}