Re: [Module-build-general] RFC: Build test test_dirs=(list)
Status: Beta
Brought to you by:
kwilliams
|
From: Steve P. <sp...@qu...> - 2003-08-12 21:39:33
|
On Tuesday, August 12, 2003, at 08:31 pm, Ken Williams wrote: > On Tuesday, August 12, 2003, at 01:25 PM, David Carmean wrote: >> >> I was suggesting a new option, not a change to the default behavior: >> An >> argument named "test_dirs". But unless I've missed a patch since >> 0.19 was >> posted to CPAN, M::B::Base::test_dirs already *does* recursively find >> ".t" files >> in t/ . > > Ooh, you're right! I remember that setting off a flag in my head when > I wrote it a long time ago, but then forgot about it. It shouldn't > scan recursively, for the reason Schwern mentions - as well as for > compatibility reasons with MakeMaker layouts. > > In some cases it might be handy to scan recursively though. We'll > have to think about a set of options that gives people flexibility in > a few different ways. A flag passed to new() would be a good idea, methinks. Perhaps 'test_recursive', 'rscan_tests' or 'scan_test_subdirs'? Speaking of flexibility, a common request I've heard is to be able to run a subset of tests. So what about letting the user run test scripts that match a regex: ./Build tests "/.*foo.*/" ./Build tests matching=".*foo.*" or maybe shell-style wild cards: ./Build tests "*foo*" -Steve |