Subject: | Preferences file |
I would like to see TAP::Harness and prove use a configuration file.
First looking in the cwd, then $HOME. I have three use cases in mind.
You currently cannot run the Perl 6 tests using prove. I'm sitting in
Patrick's Rakudo talk and he showed that. I know that you have to run
"prove --exec './perl6'". It would be nice if Perl 6 could have its own
.proverc which sets "exec: ./perl6" as the default so people don't need
to know the magic flags.
David Wheeler has been pushing for me to add special flags so MakeMaker
can pass special flags to TAP::Harness so he can execute Postgres tests.
I'm reluctant to add harness-specific code. Instead, his project could
use a .tapharnessrc file which sets his necessary flags.
Finally, users want to be able to turn on the extra features of
TAP::Harness. Anything from colorization to parallel testing. With a
.tapharnessrc in their home directory they can apply this globally.
The cwd's .tapharnessrc overlays a user's defaults. For example...
~/.tapharnessrc:
color: 1
jobs: 5
~/project/.tapharnessrc:
jobs: 1 # can't run in parallel
When TAP::Harness (or prove) are used in the project directory, the
resulting set of flags are:
color: 1
jobs: 1
While .proverc and .tapharnessrc seem to be redundant, it allows the
user to configure at their level of detail and understanding. Most
people know prove, and that's the friendliest interface. More detailed
needs, or ones that need to work in any TAP::Harness application (such
as MakeMaker and Module::Build and Test::Harness) use .tapharnessrc.