1TAP::Harness::Env(3) User Contributed Perl Documentation TAP::Harness::Env(3)
2
3
4
6 TAP::Harness::Env - Parsing harness related environmental variables
7 where appropriate
8
10 Version 3.42
11
13 my $harness = TAP::Harness::Env->create(\%extra_args)
14
16 This module implements the environmental variables that Test::Harness
17 uses with TAP::Harness, and instantiates the appropriate class with the
18 appropriate arguments.
19
21 ยท create( \%args )
22
23 This function reads the environment and generates an appropriate
24 argument hash from it. If given any arguments in %extra_args, these
25 will override the environmental defaults. In accepts
26 "harness_class" (which defaults to "TAP::Harness"), and any
27 argument the harness class accepts.
28
30 "HARNESS_PERL_SWITCHES"
31 Setting this adds perl command line switches to each test file run.
32
33 For example, "HARNESS_PERL_SWITCHES=-T" will turn on taint mode.
34 "HARNESS_PERL_SWITCHES=-MDevel::Cover" will run "Devel::Cover" for
35 each test.
36
37 "HARNESS_VERBOSE"
38 If true, "TAP::Harness" will output the verbose results of running
39 its tests.
40
41 "HARNESS_SUBCLASS"
42 Specifies a TAP::Harness subclass to be used in place of
43 TAP::Harness.
44
45 "HARNESS_OPTIONS"
46 Provide additional options to the harness. Currently supported
47 options are:
48
49 "j<n>"
50 Run <n> (default 9) parallel jobs.
51
52 "c" Try to color output. See "new" in TAP::Formatter::Base.
53
54 "a<file.tgz>"
55 Will use TAP::Harness::Archive as the harness class, and save
56 the TAP to "file.tgz"
57
58 "fPackage-With-Dashes"
59 Set the formatter_class of the harness being run. Since the
60 "HARNESS_OPTIONS" is seperated by ":", we use "-" instead.
61
62 Multiple options may be separated by colons:
63
64 HARNESS_OPTIONS=j9:c make test
65
66 "HARNESS_TIMER"
67 Setting this to true will make the harness display the number of
68 milliseconds each test took. You can also use prove's "--timer"
69 switch.
70
71 "HARNESS_COLOR"
72 Attempt to produce color output.
73
74 "HARNESS_IGNORE_EXIT"
75 If set to a true value instruct "TAP::Parser" to ignore exit and
76 wait status from test scripts.
77
78
79
80perl v5.32.0 2020-07-28 TAP::Harness::Env(3)