* Ovid <[email protected]> [2008-12-12 13:40]:
> However, "prove" shouldn't have special-case knowledge of, say,
> setting environment variables or anything like that.
Agreed.
> We could potentially have Test::Harness set an environment
> variable specifying how many tests are run and do this:
>
> use Test::Skipall if => sub { !$ENV{PROFILE_TESTS} },
> message => 'PROFILE_TESTS environment variable set';
>
> And internally it would not skip_all if "TEST_PROGRAMS_TO_RUN"
> (or whatever it's named) is not equal to 1. It scratches a huge
> itch of mine, but I don't know if anyone else would benefit or
> if this is the right approach.
Too use-case specific and magical, IMO. The whole “set a magical
environment variable to make the .t change its mind about whether
it should run” thing is broken.
It is now possible to pass switches to tests via `prove`, and
also to separate tests out into directories. Why not use those
facilities instead?
I am thinking we should have something like Test::Skipall::Getopt
to complement the directory-splitting approach where necessary. I
was originally going to propose an interface here but it was
laden with environment variable thinking; since realising that
for the mistake it would be, I have not yet come up with a solid
new idea.
Regards,
--
Aristotle Pagaltzis // <http://plasmasturm.org/>