Test2-Harness
view release on metacpan or search on metacpan
lib/App/Yath/Options/Tests.pm view on Meta::CPAN
);
option lib => (
type => 'Bool',
short => 'l',
description => "(Default: include if it exists) Include 'lib' in your module path (These will come after paths you specify with -D or -I)",
);
option blib => (
type => 'Bool',
short => 'b',
description => "(Default: include if it exists) Include 'blib/lib' and 'blib/arch' in your module path (These will come after paths you specify with -D or -I)",
);
option cover => (
type => 'Auto',
autofill => $DEFAULT_COVER_ARGS,
from_env_vars => [qw/T2_DEVEL_COVER/],
set_env_vars => [qw/T2_DEVEL_COVER/],
description => "Use Devel::Cover to calculate test coverage. This disables forking. If no args are specified the following are used: $DEFAULT_COVER_ARGS",
long_examples => ['', "=$DEFAULT_COVER_ARGS"],
);
option switches => (
type => 'List',
alt => ['switch'],
short => 'S',
description => 'Pass the specified switch to perl for each test. This is not compatible with preload.',
);
option event_timeout => (
alt => ['et'],
type => 'Scalar',
long_examples => [' SECONDS'],
short_examples => [' SECONDS'],
description => 'Kill test if no output is received within timeout period. (Default: 60 seconds). Add the "# HARNESS-NO-TIMEOUT" comment to the top of a test file to disable timeouts on a per-test basis. This prevents a hung test from runni...
);
option post_exit_timeout => (
alt => ['pet'],
type => 'Scalar',
long_examples => [' SECONDS'],
short_examples => [' SECONDS'],
description => 'Stop waiting post-exit after the timeout period. (Default: 15 seconds) Some tests fork and allow the parent to exit before writing all their output. If Test2::Harness detects an incomplete plan after the test exits it will ...
);
option unsafe_inc => (
type => 'Bool',
from_env_vars => [qw/PERL_USE_UNSAFE_INC/],
set_env_vars => [qw/PERL_USE_UNSAFE_INC/],
description => "perl is removing '.' from \@INC as a security concern. This option keeps things from breaking for now.",
);
option stream => (
type => 'Bool',
alt => ['use-stream'],
alt_no => ['TAP'],
description => "The TAP format is lossy and clunky. Test2::Harness normally uses a newer streaming format to receive test results. There are old/legacy tests where this causes problems, in which case setting --TAP or --no-stream can help.",
);
option test_args => (
type => 'List',
alt => ['test-arg'],
field => 'args',
description => 'Arguments to pass in as @ARGV for all tests that are run. These can be provided easier using the \'::\' argument separator.'
);
option input => (
type => 'Scalar',
description => 'Input string to be used as standard input for ALL tests. See also: --input-file',
);
option input_file => (
type => 'Scalar',
description => 'Use the specified file as standard input to ALL tests',
trigger => sub {
my $opt = shift;
my %params = @_;
return unless $params{action} eq 'set';
my ($file) = @{$params{val}};
die "Input file not found: $file\n" unless -f $file;
my $settings = $params{settings};
if ($settings->tests->input) {
warn "Input file is overriding a --input string.\n";
$settings->tests->field(input => undef);
}
},
);
option event_uuids => (
type => 'Bool',
description => 'Use Test2::Plugin::UUID inside tests (default: on)',
);
option mem_usage => (
type => 'Bool',
description => 'Use Test2::Plugin::MemUsage inside tests (default: on)',
);
option allow_retry => (
type => 'Bool',
description => "Toggle retry capabilities on and off (default: on)",
);
option retry => (
type => 'Scalar',
short => 'r',
description => 'Run any jobs that failed a second time. NOTE: --retry=1 means failing tests will be attempted twice!',
);
lib/App/Yath/Options/Tests.pm view on Meta::CPAN
=item --load-import Module=import_arg1,arg2,...
=item --load-import '{"Data::Dumper":["Dumper"]}'
=item --no-load-import
Load a module in each test (after fork). Import is called.
Note: Can be specified multiple times
=item --mem-usage
=item --no-mem-usage
Use Test2::Plugin::MemUsage inside tests (default: on)
=item --pet SECONDS
=item --post-exit-timeout SECONDS
=item --no-post-exit-timeout
Stop waiting post-exit after the timeout period. (Default: 15 seconds) Some tests fork and allow the parent to exit before writing all their output. If Test2::Harness detects an incomplete plan after the test exits it will monitor for more events unt...
=item -rARG
=item -r ARG
=item -r=ARG
=item --retry ARG
=item --retry=ARG
=item --no-retry
Run any jobs that failed a second time. NOTE: --retry=1 means failing tests will be attempted twice!
=item --retry-iso
=item --retry-isolated
=item --no-retry-isolated
If true then any job retries will be done in isolation (as though -j1 was set)
=item --stream
=item --use-stream
=item --no-stream
=item --TAP
The TAP format is lossy and clunky. Test2::Harness normally uses a newer streaming format to receive test results. There are old/legacy tests where this causes problems, in which case setting --TAP or --no-stream can help.
=item -S ARG
=item -S=ARG
=item -S '["json","list"]'
=item -S='["json","list"]'
=item -S :{ ARG1 ARG2 ... }:
=item -S=:{ ARG1 ARG2 ... }:
=item --switch ARG
=item --switch=ARG
=item --switches ARG
=item --switches=ARG
=item --switch '["json","list"]'
=item --switch='["json","list"]'
=item --switches '["json","list"]'
=item --switches='["json","list"]'
=item --switch :{ ARG1 ARG2 ... }:
=item --switch=:{ ARG1 ARG2 ... }:
=item --switches :{ ARG1 ARG2 ... }:
=item --switches=:{ ARG1 ARG2 ... }:
=item --no-switches
Pass the specified switch to perl for each test. This is not compatible with preload.
Note: Can be specified multiple times
=item --test-arg ARG
=item --test-arg=ARG
=item --test-args ARG
=item --test-args=ARG
=item --test-arg '["json","list"]'
=item --test-arg='["json","list"]'
=item --test-args '["json","list"]'
=item --test-args='["json","list"]'
( run in 0.557 second using v1.01-cache-2.11-cpan-39bf76dae61 )