Bump the version to 5.7.2.
[p5sagit/p5-mst-13.2.git] / t / harness
index c24d46f..6f111f1 100644 (file)
--- a/t/harness
+++ b/t/harness
@@ -29,15 +29,32 @@ $Test::Harness::verbose = shift if @ARGV && $ARGV[0] eq '-v';
                op/runlevel.t           1
                op/tie.t                1
                op/lex_assign.t         1
-               pragma/subs.t           1
                );
 
 foreach (keys %datahandle) {
      unlink "$_.t";
 }
 
-@tests = @ARGV;
-@tests = <base/*.t comp/*.t cmd/*.t io/*.t op/*.t pragma/*.t lib/*.t> unless @tests;
+if (@ARGV) {
+    @tests = @ARGV;
+} else {
+    unless (@tests) {
+       @tests = <base/*.t comp/*.t cmd/*.t run/*.t io/*.t op/*.t lib/*.t>;
+       use File::Spec;
+       my $updir = File::Spec->updir;
+       my $mani  = File::Spec->catdir(File::Spec->updir, "MANIFEST");
+       if (open(MANI, $mani)) {
+           while (<MANI>) { # similar code in t/TEST
+           if (m!^(ext/\S+/([^/]+\.t|test\.pl)|lib/\S+?(\.t|test\.pl))\s!) {
+                   push @tests, File::Spec->catdir($updir, $1);
+               }
+           }
+       } else {
+           warn "$0: cannot open $mani: $!\n";
+       }
+       push @tests, <pod/*.t>;
+    }
+}
 
 Test::Harness::runtests @tests;
 exit(0) unless -e "../testcompile";
@@ -46,7 +63,7 @@ exit(0) unless -e "../testcompile";
 #        op/bop.t      1
 #        lib/hostname.t        1
 #       op/lex_assign.t        1
-#       lib/ph.t       1  
+#       lib/ph.t       1
 #        );
 
 my $dhwrapper = <<'EOT';
@@ -72,10 +89,10 @@ EOT
 print "The tests ", join(' ', keys(%infinite)),
     " generate infinite loops! Skipping!\n";
 
-$ENV{'HARNESS_COMPILE_TEST'} = 1; 
+$ENV{'HARNESS_COMPILE_TEST'} = 1;
 $ENV{'PERLCC_TIMEOUT'} = 120 unless $ENV{'PERLCC_TIMEOUT'};
 
-Test::Harness::runtests @tests; 
+Test::Harness::runtests @tests;
 foreach (keys %datahandle) {
      unlink "$_.t";
 }