This is an expensive author-only test, move to xt/
[dbsrgits/DBIx-Class.git] / maint / Makefile.PL.inc / 11_authortests.pl
index dc3eb4c..d29b1bc 100644 (file)
@@ -12,12 +12,16 @@ File::Find::find(sub {
 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 ) );
+Meta->tests(join (' ', map { $_ || () } @xt_tests, Meta->tests ) );
 
-# inject an explicit xt test run for the create_distdir target
+# 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
 postamble <<"EOP";
 
-create_distdir : test_xt
+dbic_clonedir_copy_generated_pod : test_xt
 
 test_xt : pm_to_blib
 @{[
@@ -30,8 +34,7 @@ test_xt : pm_to_blib
     # perl cmd
     join( ' ',
       '$(ABSPERLRUN)',
-      # $'s need to be escaped (doubled) before inserting into the Makefile
-      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( ' ',
@@ -40,6 +43,23 @@ test_xt : pm_to_blib
   )
 ]}
 
+create_distdir : dbic_distdir_retest_whitespace
+
+dbic_distdir_retest_whitespace :
+\t@{[
+  $mm_proto->cd (
+    '$(DISTVNAME)',
+    $mm_proto->test_via_harness(
+      # perl cmd
+      join( ' ',
+        '$(ABSPERLRUN)',
+        map { $mm_proto->quote_literal($_) } qw(-Ilib -e $ENV{RELEASE_TESTING}=1;$ENV{DBICTEST_NO_MAKEFILE_VERIFICATION}=1;)
+      ),
+      'xt/whitespace.t'
+    )
+  )
+]}
+
 EOP
 
 # keep the Makefile.PL eval happy