summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorSteve Hay <SteveHay@planit.com>2006-03-08 15:20:28 +0000
committerSteve Hay <SteveHay@planit.com>2006-03-08 15:20:28 +0000
commitb1d1c89dd4add0044d7fe8a24cce57e62c9c1d5c (patch)
tree5e307ad21436590be55154639c7a04d856b12eb9 /t
parent1dba731d9f7b0a03b8cecb69b9d80500a283425e (diff)
downloadperl-b1d1c89dd4add0044d7fe8a24cce57e62c9c1d5c.tar.gz
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. p4raw-id: //depot/perl@27420
Diffstat (limited to 't')
-rw-r--r--t/harness6
1 files changed, 5 insertions, 1 deletions
diff --git a/t/harness b/t/harness
index b5e3e872f1..f52c4411bf 100644
--- a/t/harness
+++ b/t/harness
@@ -96,6 +96,7 @@ if (@ARGV) {
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 @@ if (@ARGV) {
# 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";
}