Eric Wilhelm wrote:
Hi all,
I've implemented a (rather rough) hack in our build subclass which
allows different testfile extensions to be mapped to test<foo> tags.
In this case, testgui will run any *.gt files found (recursively) in the
t/ directory.
testfile_types => {
'gui' => 'gt',
},
Additionally, the "testall" action will run all of the test types. I
would like to not have to explicitly define ACTION_testgui(), but for
now I would like some feedback on whether this is a desirable feature
and/or thoughts on a cleaner implementation or any glaring issues.
FWIW, I'm not sure it's good to encourage the use of non-standard file
extensions-It's a topic that has been hotly debated in the past. Why not
allow specification of test "groups" where you can name groups, assign a
list of files or a glob to a group, and then allow running one or more
groups like:
./Build test --test_group gui --test_group general
This would allow you to name files with a different extension (for ex.
to keep a compatability Makefile.PL from running all tests) without
specifically encouraging it. Better, it allows you to keep the standard
extension and still group tests.
If you want some tests to be excluded from the default "all" group, you
could provide a special group name that list files to exclude.
test_groups => {
devel => [ 't/pod.t', 't/pod_coverage.t' ],
exclude_from_all => [ 'devel' ], # exclude group 'devel'
}
Randy.