DOKK / manpages / debian 12 / libtest2-harness-perl / App::Yath::Options::Runner.3pm.en
App::Yath::Options::Runner(3pm) User Contributed Perl Documentation App::Yath::Options::Runner(3pm)

App::Yath::Options::Runner - Runner options for Yath.

This is where command line options for the runner are defined.

COMMAND OPTIONS

Runner Options

Abort all testing if a bail-out is encountered (default: on)
(Default: include if it exists) Include 'blib/lib' and 'blib/arch' in your module path
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
When using staged preload, dump the depmap for each stage as json files
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.
Add a directory to your include paths

Can be specified multiple times

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 assignemnt 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"

(Default: include if it exists) Include 'lib' in your module path
Use Devel::NYTProf on tests. This will set addpid=1 for you. This works with or without fork.
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.
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.
Preload a module before running tests

Can be specified multiple times

Use a resource module to assign resource assignments to individual tests

Can be specified multiple times

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.
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"

Pass the specified switch to perl for each test. This is not compatible with preload.

Can be specified multiple times

(Default: off) Include 't/lib' in your module path
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"

(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"

(default: on) Enable/disable timeouts

The source code repository for Test2-Harness can be found at http://github.com/Test-More/Test2-Harness/.

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/

2023-03-12 perl v5.36.0