Skip to content

Commit

Permalink
Document environmental flags in TAP::Harness::Env
Browse files Browse the repository at this point in the history
  • Loading branch information
Leont committed Jan 14, 2015
1 parent b5cd8bb commit b8e1d87
Showing 1 changed file with 62 additions and 12 deletions.
74 changes: 62 additions & 12 deletions lib/TAP/Harness/Env.pm
Expand Up @@ -134,32 +134,82 @@ Version 3.34
=head1 DESCRIPTION
This module implements the environmental variables that L<Test::Harness> for use with TAP::Harness, and instantiates it with the appropriate arguments.
This module implements the environmental variables that L<Test::Harness> uses with TAP::Harness, and instantiates the appropriate class with the appropriate arguments.
=head1 METHODS
=over 4
=item * HARNESS_PERL_SWITCHES
=item * create( \%args )
This function reads the environment and generates an appropriate argument hash from it. If given any arguments in C<%extra_args>, these will override the environmental defaults. In accepts C<harness_class> (which defaults to C<TAP::Harness>), and any argument the harness class accepts.
=back
=head1 ENVIRONMENTAL VARIABLES
=over 4
=item C<HARNESS_PERL_SWITCHES>
Setting this adds perl command line switches to each test file run.
For example, C<HARNESS_PERL_SWITCHES=-T> will turn on taint mode.
C<HARNESS_PERL_SWITCHES=-MDevel::Cover> will run C<Devel::Cover> for
each test.
=item C<HARNESS_VERBOSE>
If true, C<TAP::Harness> will output the verbose results of running
its tests.
=item * HARNESS_VERBOSE
=item C<HARNESS_SUBCLASS>
=item * HARNESS_SUBCLASS
Specifies a TAP::Harness subclass to be used in place of TAP::Harness.
=item * HARNESS_OPTIONS
=item C<HARNESS_OPTIONS>
=item * HARNESS_TIMER
Provide additional options to the harness. Currently supported options are:
=item * HARNESS_COLOR
=over
=item * HARNESS_IGNORE_EXIT
=item C<< j<n> >>
Run <n> (default 9) parallel jobs.
=item C<< c >>
Try to color output. See L<TAP::Formatter::Base/"new">.
=item C<< a<file.tgz> >>
Will use L<TAP::Harness::Archive> as the harness class, and save the TAP to
C<file.tgz>
=item C<< fPackage-With-Dashes >>
Set the formatter_class of the harness being run. Since the C<HARNESS_OPTIONS>
is seperated by C<:>, we use C<-> instead.
=back
=head1 METHODS
Multiple options may be separated by colons:
=over 4
HARNESS_OPTIONS=j9:c make test
=item * create( \%args )
=item C<HARNESS_TIMER>
This function reads the environment and generates an appropriate argument hash from it. If given any arguments in C<%extra_args>, these will override the environmental defaults. In accepts C<harness_class> (which defaults to C<TAP::Harness>), and any argument the harness class accepts.
Setting this to true will make the harness display the number of
milliseconds each test took. You can also use F<prove>'s C<--timer>
switch.
=item C<HARNESS_COLOR>
Attempt to produce color output.
=item C<HARNESS_IGNORE_EXIT>
If set to a true value instruct C<TAP::Parser> to ignore exit and wait
status from test scripts.
=back

0 comments on commit b8e1d87

Please sign in to comment.