1App::Yath::Command::resUosuerrceCso(n3t)ributed Perl DocAupmpe:n:tYaattiho:n:Command::resources(3)
2
3
4
6 App::Yath::Command::resources - View the state info for a test runner
7
9 A look at the state and resources used by a runner.
10
12 $ yath [YATH OPTIONS] resources [COMMAND OPTIONS]
13
14 YATH OPTIONS
15 Developer
16
17 --dev-lib
18 --dev-lib=lib
19 -D
20 -D=lib
21 -Dlib
22 --no-dev-lib
23 Add paths to @INC before loading ANYTHING. This is what you use if
24 you are developing yath or yath plugins to make sure the yath
25 script finds the local code instead of the installed versions of
26 the same code. You can provide an argument (-Dfoo) to provide a
27 custom path, or you can just use -D without and arg to add lib,
28 blib/lib and blib/arch.
29
30 Can be specified multiple times
31
32 Environment
33
34 --persist-dir ARG
35 --persist-dir=ARG
36 --no-persist-dir
37 Where to find persistence files.
38
39 --persist-file ARG
40 --persist-file=ARG
41 --pfile ARG
42 --pfile=ARG
43 --no-persist-file
44 Where to find the persistence file. The default is
45 /{system-tempdir}/project-yath-persist.json. If no project is
46 specified then it will fall back to the current directory. If the
47 current directory is not writable it will default to
48 /tmp/yath-persist.json which limits you to one persistent runner on
49 your system.
50
51 --project ARG
52 --project=ARG
53 --project-name ARG
54 --project-name=ARG
55 --no-project
56 This lets you provide a label for your current project/codebase.
57 This is best used in a .yath.rc file. This is necessary for a
58 persistent runner.
59
60 Help and Debugging
61
62 --show-opts
63 --no-show-opts
64 Exit after showing what yath thinks your options mean
65
66 --version
67 -V
68 --no-version
69 Exit after showing a helpful usage message
70
71 Plugins
72
73 --no-scan-plugins
74 --no-no-scan-plugins
75 Normally yath scans for and loads all App::Yath::Plugin::* modules
76 in order to bring in command-line options they may provide. This
77 flag will disable that. This is useful if you have a naughty plugin
78 that is loading other modules when it should not.
79
80 --plugins PLUGIN
81 --plugins +App::Yath::Plugin::PLUGIN
82 --plugins PLUGIN=arg1,arg2,...
83 --plugin PLUGIN
84 --plugin +App::Yath::Plugin::PLUGIN
85 --plugin PLUGIN=arg1,arg2,...
86 -pPLUGIN
87 --no-plugins
88 Load a yath plugin.
89
90 Can be specified multiple times
91
92 COMMAND OPTIONS
93 Cover Options
94
95 --cover-aggregator ByTest
96 --cover-aggregator ByRun
97 --cover-aggregator +Custom::Aggregator
98 --cover-agg ByTest
99 --cover-agg ByRun
100 --cover-agg +Custom::Aggregator
101 --no-cover-aggregator
102 Choose a custom aggregator subclass
103
104 --cover-class ARG
105 --cover-class=ARG
106 --no-cover-class
107 Choose a Test2::Plugin::Cover subclass
108
109 --cover-dirs ARG
110 --cover-dirs=ARG
111 --cover-dir ARG
112 --cover-dir=ARG
113 --no-cover-dirs
114 NO DESCRIPTION - FIX ME
115
116 Can be specified multiple times
117
118 --cover-exclude-private
119 --no-cover-exclude-private
120 --cover-files
121 --no-cover-files
122 Use Test2::Plugin::Cover to collect coverage data for what files
123 are touched by what tests. Unlike Devel::Cover this has very little
124 performance impact (About 4% difference)
125
126 --cover-from path/to/log.jsonl
127 --cover-from http://example.com/coverage
128 --cover-from path/to/coverage.jsonl
129 --no-cover-from
130 This can be a test log, a coverage dump (old style json or new
131 jsonl format), or a url to any of the previous. Tests will not be
132 run if the file/url is invalid.
133
134 --cover-from-type json
135 --cover-from-type jsonl
136 --cover-from-type log
137 --no-cover-from-type
138 File type for coverage source. Usually it can be detected, but when
139 it cannot be you should specify. "json" is old style single-blob
140 coverage data, "jsonl" is the new by-test style, "log" is a logfile
141 from a previous run.
142
143 --cover-manager My::Coverage::Manager
144 --no-cover-manager
145 Coverage 'from' manager to use when coverage data does not provide
146 one
147
148 --cover-maybe-from path/to/log.jsonl
149 --cover-maybe-from http://example.com/coverage
150 --cover-maybe-from path/to/coverage.jsonl
151 --no-cover-maybe-from
152 This can be a test log, a coverage dump (old style json or new
153 jsonl format), or a url to any of the previous. Tests will coninue
154 if even if the coverage file/url is invalid.
155
156 --cover-maybe-from-type json
157 --cover-maybe-from-type jsonl
158 --cover-maybe-from-type log
159 --no-cover-maybe-from-type
160 Same as "from_type" but for "maybe_from". Defaults to "from_type"
161 if that is specified, otherwise auto-detect
162
163 --cover-metrics
164 --no-cover-metrics
165 --cover-types ARG
166 --cover-types=ARG
167 --cover-type ARG
168 --cover-type=ARG
169 --no-cover-types
170 NO DESCRIPTION - FIX ME
171
172 Can be specified multiple times
173
174 --cover-write
175 --cover-write=coverage.jsonl
176 --cover-write=coverage.json
177 --no-cover-write
178 Create a json or jsonl file of all coverage data seen during the
179 run (This implies --cover-files).
180
181 Git Options
182
183 --git-change-base master
184 --git-change-base HEAD^
185 --git-change-base df22abe4
186 --no-git-change-base
187 Find files changed by all commits in the current branch from most
188 recent stopping when a commit is found that is also present in the
189 history of the branch/commit specified as the change base.
190
191 Help and Debugging
192
193 --dummy
194 -d
195 --no-dummy
196 Dummy run, do not actually execute anything
197
198 Can also be set with the following environment variables:
199 "T2_HARNESS_DUMMY"
200
201 --help
202 -h
203 --no-help
204 exit after showing help information
205
206 --interactive
207 -i
208 --no-interactive
209 Use interactive mode, 1 test at a time, stdin forwarded to it
210
211 --keep-dirs
212 --keep_dir
213 -k
214 --no-keep-dirs
215 Do not delete directories when done. This is useful if you want to
216 inspect the directories used for various commands.
217
218 --procname-prefix ARG
219 --procname-prefix=ARG
220 --no-procname-prefix
221 Add a prefix to all proc names (as seen by ps).
222
223 Runner Options
224
225 --abort-on-bail
226 --no-abort-on-bail
227 Abort all testing if a bail-out is encountered (default: on)
228
229 --blib
230 -b
231 --no-blib
232 (Default: include if it exists) Include 'blib/lib' and 'blib/arch'
233 in your module path
234
235 --cover
236 --cover=-silent,1,+ignore,^t/,+ignore,^t2/,+ignore,^xt,+ignore,^test.pl
237 --no-cover
238 Use Devel::Cover to calculate test coverage. This disables forking.
239 If no args are specified the following are used:
240 -silent,1,+ignore,^t/,+ignore,^t2/,+ignore,^xt,+ignore,^test.pl
241
242 --dump-depmap
243 --no-dump-depmap
244 When using staged preload, dump the depmap for each stage as json
245 files
246
247 --event-timeout SECONDS
248 --et SECONDS
249 --no-event-timeout
250 Kill test if no output is received within timeout period. (Default:
251 60 seconds). Add the "# HARNESS-NO-TIMEOUT" comment to the top of a
252 test file to disable timeouts on a per-test basis. This prevents a
253 hung test from running forever.
254
255 --include ARG
256 --include=ARG
257 -I ARG
258 -I=ARG
259 --no-include
260 Add a directory to your include paths
261
262 Can be specified multiple times
263
264 --job-count 4
265 --job-count 8:2
266 --jobs 4
267 --jobs 8:2
268 -j4
269 -j8:2
270 --no-job-count
271 Set the number of concurrent jobs to run. Add a :# if you also wish
272 to designate multiple slots per test. 8:2 means 8 slots, but each
273 test gets 2 slots, so 4 tests run concurrently. Tests can find
274 their concurrency assignemnt in the "T2_HARNESS_MY_JOB_CONCURRENCY"
275 environment variable.
276
277 Can also be set with the following environment variables:
278 "YATH_JOB_COUNT", "T2_HARNESS_JOB_COUNT", "HARNESS_JOB_COUNT"
279
280 --lib
281 -l
282 --no-lib
283 (Default: include if it exists) Include 'lib' in your module path
284
285 --nytprof
286 --no-nytprof
287 Use Devel::NYTProf on tests. This will set addpid=1 for you. This
288 works with or without fork.
289
290 --post-exit-timeout SECONDS
291 --pet SECONDS
292 --no-post-exit-timeout
293 Stop waiting post-exit after the timeout period. (Default: 15
294 seconds) Some tests fork and allow the parent to exit before
295 writing all their output. If Test2::Harness detects an incomplete
296 plan after the test exits it will monitor for more events until the
297 timeout period. Add the "# HARNESS-NO-TIMEOUT" comment to the top
298 of a test file to disable timeouts on a per-test basis.
299
300 --preload-threshold ARG
301 --preload-threshold=ARG
302 --Pt ARG
303 --Pt=ARG
304 -W ARG
305 -W=ARG
306 --no-preload-threshold
307 Only do preload if at least N tests are going to be run. In some
308 cases a full preload takes longer than simply running the tests,
309 this lets you specify a minimum number of test jobs that will be
310 run for preload to happen. This has no effect for a persistent
311 runner. The default is 0, and it means always preload.
312
313 --preloads ARG
314 --preloads=ARG
315 --preload ARG
316 --preload=ARG
317 -P ARG
318 -P=ARG
319 --no-preloads
320 Preload a module before running tests
321
322 Can be specified multiple times
323
324 --resource Port
325 --resource +Test2::Harness::Runner::Resource::Port
326 -R Port
327 --no-resource
328 Use a resource module to assign resource assignments to individual
329 tests
330
331 Can be specified multiple times
332
333 --runner-id ARG
334 --runner-id=ARG
335 --no-runner-id
336 Runner ID (usually a generated uuid)
337
338 --shared-jobs-config .sharedjobslots.yml
339 --shared-jobs-config relative/path/.sharedjobslots.yml
340 --shared-jobs-config /absolute/path/.sharedjobslots.yml
341 --no-shared-jobs-config
342 Where to look for a shared slot config file. If a filename with no
343 path is provided yath will search the current and all parent
344 directories for the name.
345
346 --slots-per-job 2
347 -x2
348 --no-slots-per-job
349 This sets the number of slots each job will use (default 1). This
350 is normally set by the ':#' in '-j#:#'.
351
352 Can also be set with the following environment variables:
353 "T2_HARNESS_JOB_CONCURRENCY"
354
355 --switch ARG
356 --switch=ARG
357 -S ARG
358 -S=ARG
359 --no-switch
360 Pass the specified switch to perl for each test. This is not
361 compatible with preload.
362
363 Can be specified multiple times
364
365 --tlib
366 --no-tlib
367 (Default: off) Include 't/lib' in your module path
368
369 --unsafe-inc
370 --no-unsafe-inc
371 perl is removing '.' from @INC as a security concern. This option
372 keeps things from breaking for now.
373
374 Can also be set with the following environment variables:
375 "PERL_USE_UNSAFE_INC"
376
377 --use-fork
378 --fork
379 --no-use-fork
380 (default: on, except on windows) Normally tests are run by forking,
381 which allows for features like preloading. This will turn off the
382 behavior globally (which is not compatible with preloading). This
383 is slower, it is better to tag misbehaving tests with the '#
384 HARNESS-NO-PRELOAD' comment in their header to disable forking only
385 for those tests.
386
387 Can also be set with the following environment variables:
388 "!T2_NO_FORK", "T2_HARNESS_FORK", "!T2_HARNESS_NO_FORK",
389 "YATH_FORK", "!YATH_NO_FORK"
390
391 --use-timeout
392 --timeout
393 --no-use-timeout
394 (default: on) Enable/disable timeouts
395
396 YathUI Options
397
398 --yathui-api-key ARG
399 --yathui-api-key=ARG
400 --no-yathui-api-key
401 Yath-UI API key. This is not necessary if your Yath-UI instance is
402 set to single-user
403
404 --yathui-db
405 --no-yathui-db
406 Add the YathUI DB renderer in addition to other renderers
407
408 --yathui-grace
409 --no-yathui-grace
410 If yath cannot connect to yath-ui it normally throws an error, use
411 this to make it fail gracefully. You get a warning, but things keep
412 going.
413
414 --yathui-long-duration 10
415 --no-yathui-long-duration
416 Minimum duration length (seconds) before a test goes from MEDIUM to
417 LONG
418
419 --yathui-medium-duration 5
420 --no-yathui-medium-duration
421 Minimum duration length (seconds) before a test goes from SHORT to
422 MEDIUM
423
424 --yathui-mode summary
425 --yathui-mode qvf
426 --yathui-mode qvfd
427 --yathui-mode complete
428 --no-yathui-mode
429 Set the upload mode (default 'qvfd')
430
431 --yathui-only
432 --no-yathui-only
433 Only use the YathUI renderer
434
435 --yathui-only-db
436 --no-yathui-only-db
437 Only use the YathUI DB renderer
438
439 --yathui-port 8080
440 --no-yathui-port
441 Port to use when running a local server
442
443 --yathui-port-command get_port.sh
444 --yathui-port-command get_port.sh --pid $$
445 --no-yathui-port-command
446 Use a command to get a port number. "$$" will be replaced with the
447 PID of the yath process
448
449 --yathui-project ARG
450 --yathui-project=ARG
451 --no-yathui-project
452 The Yath-UI project for your test results
453
454 --yathui-render
455 --no-yathui-render
456 Add the YathUI renderer in addition to other renderers
457
458 --yathui-resources
459 --yathui-resources=5
460 --no-yathui-resources
461 Send resource info (for supported resources) to yathui at the
462 specified interval in seconds (5 if not specified)
463
464 --yathui-retry
465 --no-yathui-retry
466 How many times to try an operation before giving up
467
468 Can be specified multiple times
469
470 --yathui-schema PostgreSQL
471 --yathui-schema MySQL
472 --yathui-schema MySQL56
473 --no-yathui-schema
474 What type of DB/schema to use when using a temporary database
475
476 --yathui-url http://my-yath-ui.com/...
477 --uri http://my-yath-ui.com/...
478 --no-yathui-url
479 Yath-UI url
480
481 --yathui-user ARG
482 --yathui-user=ARG
483 --no-yathui-user
484 Username to attach to the data sent to the db
485
486 --yathui-db-buffering none
487 --yathui-db-buffering job
488 --yathui-db-buffering diag
489 --yathui-db-buffering run
490 --no-yathui-db-buffering
491 Type of buffering to use, if "none" then events are written to the
492 db one at a time, which is SLOW
493
494 --yathui-db-config ARG
495 --yathui-db-config=ARG
496 --no-yathui-db-config
497 Module that implements 'MODULE->yath_ui_config(%params)' which
498 should return a Test2::Harness::UI::Config instance.
499
500 --yathui-db-coverage
501 --no-yathui-db-coverage
502 Pull coverage data directly from the database (default: off)
503
504 --yathui-db-driver Pg
505 --yathui-db-drivermysql
506 --yathui-db-driverMariaDB
507 --no-yathui-db-driver
508 DBI Driver to use
509
510 --yathui-db-dsn ARG
511 --yathui-db-dsn=ARG
512 --no-yathui-db-dsn
513 DSN to use when connecting to the db
514
515 --yathui-db-duration-limit ARG
516 --yathui-db-duration-limit=ARG
517 --no-yathui-db-duration-limit
518 Limit the number of runs to look at for durations data (default:
519 10)
520
521 --yathui-db-durations
522 --no-yathui-db-durations
523 Pull duration data directly from the database (default: off)
524
525 --yathui-db-flush-interval 2
526 --yathui-db-flush-interval 1.5
527 --no-yathui-db-flush-interval
528 When buffering DB writes, force a flush when an event is recieved
529 at least N seconds after the last flush.
530
531 --yathui-db-host ARG
532 --yathui-db-host=ARG
533 --no-yathui-db-host
534 hostname to use when connecting to the db
535
536 --yathui-db-name ARG
537 --yathui-db-name=ARG
538 --no-yathui-db-name
539 Name of the database to use for yathui
540
541 --yathui-db-pass ARG
542 --yathui-db-pass=ARG
543 --no-yathui-db-pass
544 Password to use when connecting to the db
545
546 --yathui-db-port ARG
547 --yathui-db-port=ARG
548 --no-yathui-db-port
549 port to use when connecting to the db
550
551 --yathui-db-publisher ARG
552 --yathui-db-publisher=ARG
553 --no-yathui-db-publisher
554 When using coverage or duration data, only use data uploaded by
555 this user
556
557 --yathui-db-socket ARG
558 --yathui-db-socket=ARG
559 --no-yathui-db-socket
560 socket to use when connecting to the db
561
562 --yathui-db-user ARG
563 --yathui-db-user=ARG
564 --no-yathui-db-user
565 Username to use when connecting to the db
566
568 The source code repository for Test2-Harness can be found at
569 http://github.com/Test-More/Test2-Harness/.
570
572 Chad Granum <exodist@cpan.org>
573
575 Chad Granum <exodist@cpan.org>
576
578 Copyright 2023 Chad Granum <exodist7@gmail.com>.
579
580 This program is free software; you can redistribute it and/or modify it
581 under the same terms as Perl itself.
582
583 See http://dev.perl.org/licenses/
584
585
586
587perl v5.36.1 2023-10-04 App::Yath::Command::resources(3)