Re: [Module-build-general] RFC: Build test test_dirs=(list)
Status: Beta
Brought to you by:
kwilliams
|
From: Steve P. <sp...@qu...> - 2003-08-13 01:24:13
|
On Wednesday, August 13, 2003, at 01:02 am, Michael G Schwern wrote: > On Tue, Aug 12, 2003 at 11:51:16PM +0100, Steve Purkis wrote: >>> If I want to test only the methods in the parent class Foo::Bar::One, >>> I run "Build test test_dirs=t/Foo/Bar/One/t". If I want to run >>> the tests for that class and all it's children, I run >>> "Build test test_dirs=t/Foo/Bar/One". If I'm fixing a bug in >>> Foo::Bar::One::B, >>> I run "Build test test_dirs=t/Foo/Bar/One/B/t" over and over, and >>> then >>> when I'm >>> satisfied I run a full regression test with "Build test". >> >> That works fine if you organize tests by directory, but a lot of >> authors like to group their tests by function in the /t directory - > > This may be a habit formed from MakeMaker's limitation on directory > depth. Maybe, but it's also something that's not going to go away anytime soon. And I'm not convinced it's a bad habit (especially not for small projects). >> Using regexps on the path to the test script would let you specify a >> subset of tests to run in all of these scenarios: >> >> ./Build test matching=t/Foo/Bar/One >> ./Build test matching=runthrough >> ./Build test matching=t/0* >> >> Which could be handy. > > I presume you mean globs, not regexes? Nope, I meant regexes, that's just a typo in my example: ./Build test matching=t/0.* Here's some better examples: # run all tests found that have 'foo' in their names: ./Build test matching=Foo # for David's example, same as this (recursive) glob: ./Build test test_files=t/Foo/ # ... but might also include: ./Build test test_files=t/Bar/Foo/ Us numbered-test freaks could run sets of tests like this: # run tests 50-99: ./Build test matching=[5-9]\\d And 'matching' can co-exist with globs, which are also a good idea: # run all tests in t/Foo ending in "oo.t" ./Build test test_files=t/Foo/* matching=oo\\.t I've attached a patch based on your glob one that implements this. -Steve |