Re: [Module-build-general] RFC: Build test test_dirs=(list)
Status: Beta
Brought to you by:
kwilliams
|
From: Ken W. <ke...@ma...> - 2003-08-13 21:10:10
|
On Wednesday, August 13, 2003, at 03:02 PM, Michael G Schwern wrote:
> Danger! Sorting order. Using glob("t/*.t") as the default order means
> it is no longer guaranteed. At best they'll be ASCIIbetical, but even
> that
> depends on the glob implementation.
Yeah, but they do get sorted later on.
> just change that to
>
> push @tests, sort { lc $a cmp lc $b } $self->expand_test_dir('t')
> ...
>
> in order to guarantee that "Build test" runs in the same order on
> every OS.
> Don't sort anything but the default, though. You want to leave an
> opening
> for users to change the order.
I think the sorting should move from where it is now (end of
test_files()) to inside the expand_test_dir() routine. That will
preserve any order the user specifies with the 'test_files' parameter,
while giving predictable sorting order on glob expansions.
-Ken
|