NAME
App::Yath::Options::Runner - Runner options for Yath.
DESCRIPTION
This is where command line options for the runner are defined.
PROVIDED OPTIONS
COMMAND OPTIONS
Runner Options
- --abort-on-bail
- --no-abort-on-bail
-
Abort all testing if a bail-out is encountered (default: on)
- --blib
- -b
- --no-blib
-
(Default: include if it exists) Include 'blib/lib' and 'blib/arch' in your module path
- --cover
- --cover=-silent,1,+ignore,^t/,+ignore,^t2/,+ignore,^xt,+ignore,^test.pl
- --no-cover
-
Use Devel::Cover to calculate test coverage. This disables forking. If no args are specified the following are used: -silent,1,+ignore,^t/,+ignore,^t2/,+ignore,^xt,+ignore,^test.pl
- --dump-depmap
- --no-dump-depmap
-
When using staged preload, dump the depmap for each stage as json files
- --event-timeout SECONDS
- --et SECONDS
- --no-event-timeout
-
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 running forever.
- --fail-on-resource-skip
- --no-fail-on-resource-skip
-
Treat resource-skipped tests as failures instead of skips. When enabled, tests that would be skipped due to unavailable resources will be marked as failing.
- --include ARG
- --include=ARG
- -I ARG
- -I=ARG
- --no-include
-
Add a directory to your include paths
Can be specified multiple times
- --job-count 4
- --job-count 8:2
- --jobs 4
- --jobs 8:2
- -j4
- -j8:2
- --no-job-count
-
Set the number of concurrent jobs to run. Add a :# if you also wish to designate multiple slots per test. 8:2 means 8 slots, but each test gets 2 slots, so 4 tests run concurrently. Tests can find their concurrency assignment in the "T2_HARNESS_MY_JOB_CONCURRENCY" environment variable.
Can also be set with the following environment variables:
YATH_JOB_COUNT,T2_HARNESS_JOB_COUNT,HARNESS_JOB_COUNT - --lib
- -l
- --no-lib
-
(Default: include if it exists) Include 'lib' in your module path
- --nytprof
- --no-nytprof
-
Use Devel::NYTProf on tests. This will set addpid=1 for you. This works with or without fork.
- --post-exit-timeout SECONDS
- --pet SECONDS
- --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 until the timeout period. Add the "# HARNESS-NO-TIMEOUT" comment to the top of a test file to disable timeouts on a per-test basis.
- --preload-threshold ARG
- --preload-threshold=ARG
- --Pt ARG
- --Pt=ARG
- -W ARG
- -W=ARG
- --no-preload-threshold
-
Only do preload if at least N tests are going to be run. In some cases a full preload takes longer than simply running the tests, this lets you specify a minimum number of test jobs that will be run for preload to happen. This has no effect for a persistent runner. The default is 0, and it means always preload.
- --preloads ARG
- --preloads=ARG
- --preload ARG
- --preload=ARG
- -P ARG
- -P=ARG
- --no-preloads
-
Preload a module before running tests
Can be specified multiple times
- --resource-timeout SECONDS
- --rt SECONDS
- --no-resource-timeout
-
Abort the test run if no tests have been able to start for SECONDS seconds while there are pending tests and none running. This is useful when a resource class is broken and always claims a resource will become available, preventing yath from ever finishing. (Default: 0, meaning no timeout)
- --resource Port
- --resource +Test2::Harness::Runner::Resource::Port
- -R Port
- --no-resource
-
Use a resource module to assign resource assignments to individual tests
Can be specified multiple times
- --runner-id ARG
- --runner-id=ARG
- --no-runner-id
-
Runner ID (usually a generated uuid)
-
Where to look for a shared slot config file. If a filename with no path is provided yath will search the current and all parent directories for the name.
- --slots-per-job 2
- -x2
- --no-slots-per-job
-
This sets the number of slots each job will use (default 1). This is normally set by the ':#' in '-j#:#'.
Can also be set with the following environment variables:
T2_HARNESS_JOB_CONCURRENCY - --stall-report
- --stall-report=STRONG:LOOSE
- --stall-report=SECONDS
- --no-stall-report
-
Print diagnostics when the scheduler appears to have stopped starting tests. Give it alone for sensible waits, or set them: STRONG is the wait, in seconds, before reporting when tests are pending and none are running; LOOSE is the wait when tests are pending and others are still running. A single number sets both, and a zero in either field turns off that tier alone, so 600:0 reports only when nothing is running. This only prints a report, it never ends the run, and a report may be benign. Enabling it sends SIGUSR1 to yath's own processes to collect stack traces, pauses output for a few seconds per report, stops after 5 reports, and writes a yath-stall-report-*.json bundle both into the run log and to a file (see --stall-report-dir). (Default: off; --stall-report alone means 600:1200)
- --stall-report-dir path/to/dir
- --no-stall-report-dir
-
Directory for the JSON bundle --stall-report writes. Defaults to the directory yath was run from. Use this when that directory is not writable, or to collect bundles somewhere durable.
- --switch ARG
- --switch=ARG
- -S ARG
- -S=ARG
- --no-switch
-
Pass the specified switch to perl for each test. This is not compatible with preload.
Can be specified multiple times
- --tlib
- --no-tlib
-
(Default: off) Include 't/lib' in your module path
- --unsafe-inc
- --no-unsafe-inc
-
perl is removing '.' from @INC as a security concern. This option keeps things from breaking for now.
Can also be set with the following environment variables:
PERL_USE_UNSAFE_INC - --use-fork
- --fork
- --no-use-fork
-
(default: on, except on windows) Normally tests are run by forking, which allows for features like preloading. This will turn off the behavior globally (which is not compatible with preloading). This is slower, it is better to tag misbehaving tests with the '# HARNESS-NO-PRELOAD' comment in their header to disable forking only for those tests.
Can also be set with the following environment variables:
!T2_NO_FORK,T2_HARNESS_FORK,!T2_HARNESS_NO_FORK,YATH_FORK,!YATH_NO_FORK - --use-timeout
- --timeout
- --no-use-timeout
-
(default: on) Enable/disable timeouts
SOURCE
The source code repository for Test2-Harness can be found at http://github.com/Test-More/Test2-Harness/.
MAINTAINERS
AUTHORS
COPYRIGHT
Copyright 2020 Chad Granum <exodist7@gmail.com>.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See http://dev.perl.org/licenses/