Change 27420 by [EMAIL PROTECTED] on 2006/03/08 15:20:28

        Sort the ext/ and lib/ tests when running under t/harness
        
        Unless they are sorted then they are run in the same order in which
        they are listed in MANIFEST, which is not always ideal. In particular,
        the ext/Compress/IO/Zlib/t/*.t tests are not run in the correct order,
        which causes some files to be left behind afterwards.
        
        ExtUtils::Command::MM::test_harness() sorts test files, so it seems
        sensible for t/harness to do likewise, rather than relying on the
        ordering in MANIFEST.

Affected files ...

... //depot/perl/t/harness#39 edit

Differences ...

==== //depot/perl/t/harness#39 (text) ====
Index: perl/t/harness
--- perl/t/harness#38~25966~    2005-11-02 17:45:45.000000000 -0800
+++ perl/t/harness      2006-03-08 07:20:28.000000000 -0800
@@ -96,6 +96,7 @@
        my $updir = File::Spec->updir;
        my $mani  = File::Spec->catfile(File::Spec->updir, "MANIFEST");
        if (open(MANI, $mani)) {
+           my @manitests = ();
            while (<MANI>) { # similar code in t/TEST
                if 
(m!^(ext/(\S+)/+(?:[^/\s]+\.t|test\.pl)|lib/\S+?(?:\.t|test\.pl))\s!) {
                    my ($test, $extension) = ($1, $2);
@@ -104,10 +105,13 @@
                        # XXX Do I want to warn that I'm skipping these?
                        next if $skip{$extension};
                    }
-                   push @tests, File::Spec->catfile($updir, $test);
+                   push @manitests, File::Spec->catfile($updir, $test);
                }
            }
            close MANI;
+           # Sort the list of test files read from MANIFEST into a sensible
+           # order instead of using the order in which they are listed there
+           push @tests, sort { lc $a cmp lc $b } @manitests;
        } else {
            warn "$0: cannot open $mani: $!\n";
        }
End of Patch.

Reply via email to