App::Y...sources(3pm)
π NAME π
Bestie, this is the App::Y...sources(3pm) page from User Contributed Perl Documentation β¨ and the command we're talking about is App::Yath::Command::resources β View the state info for a test runner. It's giving main character energy for your test runner's internal state π
.
πΈ DESCRIPTION πΈ
A look at the state and resources used by a runner. Lowkey a vibe check on the state and the resources a runner is using πβ¨.
β¨ USAGE β¨
$ yath [YATH OPTIONS] resources [COMMAND OPTIONS]
That's the shape of it, fr fr π«Ά.
π¦ YATH OPTIONS π¦
okay so these are the yath-level options that come before the resources command. Slay.
π Developer π
--dev-lib,--dev-lib=lib,-D,-D=lib,-Dlib,--no-dev-libβ Add paths to@INCbefore loading ANYTHING. This is what you use if you are developing yath or yath plugins to make sure the yath script finds the local code instead of the installed versions of the same code. You can provide an argument (-Dfoo) to provide a custom path, or you can just use-Dwithout an arg to addlib,blib/libandblib/arch. Can be specified multiple times.
π Environment π
--persist-dir ARG,--persist-dir=ARG,--no-persist-dirβ Where to find persistence files.--persist-file ARG,--persist-file=ARG,--pfile ARG,--pfile=ARG,--no-persist-fileβ Where to find the persistence file. The default is/{system-tempdir}/project-yath-persist.json. If no project is specified then it will fall back to the current directory. If the current directory is not writable it will default to/tmp/yath-persist.jsonwhich limits you to one persistent runner on your system.--project ARG,--project=ARG,--project-name ARG,--project-name=ARG,--no-projectβ This lets you provide a label for your current project/codebase. This is best used in a.yath.rcfile. This is necessary for a persistent runner.
π§ Help and Debugging π§
--show-opts,--no-show-optsβ Exit after showing what yath thinks your options mean.--version,-V,--no-versionβ Exit after showing a helpful usage message.
π Plugins π
--no-scan-plugins,--no-no-scan-pluginsβ Normally yath scans for and loads allApp::Yath::Plugin::*modules in order to bring in command-line options they may provide. This flag will disable that. This is useful if you have a naughty plugin that is loading other modules when it should not.--plugins PLUGIN,--plugins +App::Yath::Plugin::PLUGIN,--plugins PLUGIN=arg1,arg2,...,--plugin PLUGIN,--plugin +App::Yath::Plugin::PLUGIN,--plugin PLUGIN=arg1,arg2,...,-pPLUGIN,--no-pluginsβ Load a yath plugin. Can be specified multiple times.
π COMMAND OPTIONS π
These are the command-specific options for resources. They're giving "I only apply here" energy π
.
Cover Options
--cover-aggregator ByTest,--cover-aggregator ByRun,--cover-aggregator +Custom::Aggregator,--cover-agg ByTest,--cover-agg ByRun,--cover-agg +Custom::Aggregator,--no-cover-aggregatorβ Choose a custom aggregator subclass.--cover-class ARG,--cover-class=ARG,--no-cover-classβ Choose aTest2::Plugin::Coversubclass.--cover-dirs ARG,--cover-dirs=ARG,--cover-dir ARG,--cover-dir=ARG,--no-cover-dirsβ NO DESCRIPTION - FIX ME π. Can be specified multiple times.--cover-exclude-private,--no-cover-exclude-private,--cover-files,--no-cover-filesβ UseTest2::Plugin::Coverto collect coverage data for what files are touched by what tests. Unlike Devel::Cover this has very little performance impact (About 4% difference).--cover-from path/to/log.jsonl,--cover-from http://example.com/coverage,--cover-from path/to/coverage.jsonl,--no-cover-fromβ This can be a test log, a coverage dump (old style json or new jsonl format), or a url to any of the previous. Tests will not be run if the file/url is invalid.--cover-from-type json,--cover-from-type jsonl,--cover-from-type log,--no-cover-from-typeβ File type for coverage source. Usually it can be detected, but when it cannot be you should specify."json"is old style single-blob coverage data,"jsonl"is the new by-test style,"log"is a logfile from a previous run.--cover-manager My::Coverage::Manager,--no-cover-managerβ Coverage 'from' manager to use when coverage data does not provide one.--cover-maybe-from path/to/log.jsonl,--cover-maybe-from http://example.com/coverage,--cover-maybe-from path/to/coverage.jsonl,--no-cover-maybe-fromβ This can be a test log, a coverage dump (old style json or new jsonl format), or a url to any of the previous. Tests will continue even if the coverage file/url is invalid.--cover-maybe-from-type json,--cover-maybe-from-type jsonl,--cover-maybe-from-type log,--no-cover-maybe-from-typeβ Same as"from_type"but for"maybe_from". Defaults to"from_type"if that is specified, otherwise auto-detect.--cover-metrics,--no-cover-metrics,--cover-types ARG,--cover-types=ARG,--cover-type ARG,--cover-type=ARG,--no-cover-typesβ NO DESCRIPTION - FIX ME π. Can be specified multiple times.--cover-write,--cover-write=coverage.jsonl,--cover-write=coverage.json,--no-cover-writeβ Create a json or jsonl file of all coverage data seen during the run (This implies--cover-files).
Git Options
--git-change-base master,--git-change-base HEAD^,--git-change-base df22abe4,--no-git-change-baseβ Find files changed by all commits in the current branch from most recent stopping when a commit is found that is also present in the history of the branch/commit specified as the change base.
Help and Debugging
--dummy,-d,--no-dummyβ Dummy run, do not actually execute anything. Can also be set with the following environment variables:"T2_HARNESS_DUMMY".--help,-h,--no-helpβ exit after showing help information.--interactive,-i,--no-interactiveβ Use interactive mode, 1 test at a time, stdin forwarded to it.--keep-dirs,--keep_dir,-k,--no-keep-dirsβ Do not delete directories when done. This is useful if you want to inspect the directories used for various commands.--procname-prefix ARG,--procname-prefix=ARG,--no-procname-prefixβ Add a prefix to all proc names (as seen byps).
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:2means 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 setaddpid=1for 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 is0, 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 forSECONDSseconds 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).--shared-jobs-config .sharedjobslots.yml,--shared-jobs-config relative/path/.sharedjobslots.yml,--shared-jobs-config /absolute/path/.sharedjobslots.yml,--no-shared-jobs-configβ 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β okay so this one sets how many slots each job gets to use (default1, bestie). Usually you're not setting this by hand bc it's set by the:#in-j#:#, iykyk.
You can also set it with this env var: T2_HARNESS_JOB_CONCURRENCY
--switch ARG,--switch=ARG,-S ARG,-S=ARG,--no-switchβ passes the switch you name straight to perl for every single test π. Heads up though: this is not compatible with preload, so don't come crying to me when it vibes wrong together.
Can be specified multiple times π
--tlib,--no-tlibβ (Default: off) addst/libinto your module path. that's it, that's the whole thing π--unsafe-inc,--no-unsafe-incβ so perl is literally removing'.'from@INCfor security reasons π and this option is the little bandaid that keeps stuff from breaking for now. no cap.
You can also set it with this env var: PERL_USE_UNSAFE_INC
--use-fork,--fork,--no-use-forkβ (default: on, except on windows πͺ) Normally tests get run by forking, which is what lets the fancy stuff like preloading happen. Turning this off kills that behavior globally β and no, global off is not compatible with preloading, just so we're clear. It's also slower π so the move is to tag the misbehaving tests with the# HARNESS-NO-PRELOADcomment in their header and disable forking for those tests only. main character problem-solving fr.
You can also set it with these env vars: !T2_NO_FORK, T2_HARNESS_FORK, !T2_HARNESS_NO_FORK, YATH_FORK, !YATH_NO_FORK
--use-timeout,--timeout,--no-use-timeoutβ (default: on) turns timeouts on/off. simple as that β±οΈβ¨
β¨ YathUI Options β¨
--yathui-api-key ARG,--yathui-api-key=ARG,--no-yathui-api-keyβ your Yath-UI API key π. You don't even need this if your Yath-UI instance is set to single-user.--yathui-grace,--no-yathui-graceβ normally, ifyathcan't connect toyath-ui, it just throws an error and we all perish π. Using this makes it fail gracefully instead β you still get a warning, but everything keeps going π«Ά.--yathui-long-duration 10,--no-yathui-long-durationβ minimum duration length, in seconds, before a test levels up from MEDIUM to LONG β¬οΈ--yathui-medium-duration 5,--no-yathui-medium-durationβ minimum duration length, in seconds, before a test levels up from SHORT to MEDIUM β¬οΈ--yathui-mode summary,--yathui-mode qvf,--yathui-mode qvfd,--yathui-mode complete,--no-yathui-modeβ sets the upload mode (default'qvfd') π€--yathui-project ARG,--yathui-project=ARG,--no-yathui-projectβ the Yath-UI project your test results belong to ποΈ--yathui-retry,--no-yathui-retryβ how many times to try an operation before giving up π€
Can be specified multiple times
--yathui-url http://my-yath-ui.com/...,--uri http://my-yath-ui.com/...,--no-yathui-urlβ the Yath-UI url π
πΈ SOURCE πΈ
The source code repository for Test2-Harness can be found at http://github.com/Test-More/Test2-Harness/. go star it, bestie π
π MAINTAINERS π
Chad Granum <exodist@cpan.org>
π¦ AUTHORS π¦
Chad Granum <exodist@cpan.org>
π COPYRIGHT π
Copyright 2026 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/
and that's a wrap, bestie π this was perl v5.40.1, dated 2026-05-10, straight from the App::Y...sources(3pm) manual page β iconic behavior tbh, now go run some tests π
β¨
π¦ where this page comes from
- ubuntu stonking: libtest2-harness-perl 1.000172-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms