Re: [Module-build-general] sorting tests
Status: Beta
Brought to you by:
kwilliams
|
From: Ken W. <ke...@ma...> - 2002-08-27 09:29:00
|
On Monday, August 26, 2002, at 02:00 AM, Dave Rolsky wrote:
> By default, tests are now sorted in ExtUtils::MakeMaker. In older
> versions, it just used 'glob', which normally sorted the results anyway.
I sort of wish Test::Harness sorted these internally, instead of
requiring the caller to sort them. But I can do a patch like this, in
any case, until it's deemed inadequate:
=======================================
if (@tests) {
# Work around a Test::Harness bug that loses the particular perl
we're running under
local $^X = $self->{config}{perlpath} unless
$Test::Harness::VERSION gt '2.01';
- Test::Harness::runtests(@tests);
+ Test::Harness::runtests(sort @tests);
} else {
print("No tests defined.\n");
}
=======================================
I'll apply it when Sourceforge imports the CVS tree.
>
> There is also a 'TEST_FILES' parameter for WriteMakefile which
> specifies a
> list of tests to run (I think as a string). It'd be good to have an
> equivalent for M::B.
Yeah, I agree that TEST_FILES is handy, and some kind of selector
mechanism like that should be in M::B. Not sure what the syntax should
look like yet. Internally, it should just generate a list of files to
run.
-Ken
|