1App::Yath::Command::spaUwsne(r3)Contributed Perl DocumenAtpapt:i:oYnath::Command::spawn(3)
2
3
4
6 App::Yath::Command::spawn - Launch a perl script from the preloaded
7 environment
8
10 This will launch the specified script from the preloaded yath process.
11
12 NOTE: environment variables are not automatically passed to the spawned
13 process. You must use -e or -E (see help) to specify what environment
14 variables you care about.
15
17 $ yath [YATH OPTIONS] spawn [COMMAND OPTIONS]
18
19 YATH OPTIONS
20 Developer
21
22 --dev-lib
23 --dev-lib=lib
24 -D
25 -D=lib
26 -Dlib
27 --no-dev-lib
28 Add paths to @INC before loading ANYTHING. This is what you use if
29 you are developing yath or yath plugins to make sure the yath
30 script finds the local code instead of the installed versions of
31 the same code. You can provide an argument (-Dfoo) to provide a
32 custom path, or you can just use -D without and arg to add lib,
33 blib/lib and blib/arch.
34
35 Can be specified multiple times
36
37 Environment
38
39 --persist-dir ARG
40 --persist-dir=ARG
41 --no-persist-dir
42 Where to find persistence files.
43
44 --persist-file ARG
45 --persist-file=ARG
46 --pfile ARG
47 --pfile=ARG
48 --no-persist-file
49 Where to find the persistence file. The default is
50 /{system-tempdir}/project-yath-persist.json. If no project is
51 specified then it will fall back to the current directory. If the
52 current directory is not writable it will default to
53 /tmp/yath-persist.json which limits you to one persistent runner on
54 your system.
55
56 --project ARG
57 --project=ARG
58 --project-name ARG
59 --project-name=ARG
60 --no-project
61 This lets you provide a label for your current project/codebase.
62 This is best used in a .yath.rc file. This is necessary for a
63 persistent runner.
64
65 Help and Debugging
66
67 --show-opts
68 --no-show-opts
69 Exit after showing what yath thinks your options mean
70
71 --version
72 -V
73 --no-version
74 Exit after showing a helpful usage message
75
76 Plugins
77
78 --no-scan-plugins
79 --no-no-scan-plugins
80 Normally yath scans for and loads all App::Yath::Plugin::* modules
81 in order to bring in command-line options they may provide. This
82 flag will disable that. This is useful if you have a naughty plugin
83 that is loading other modules when it should not.
84
85 --plugins PLUGIN
86 --plugins +App::Yath::Plugin::PLUGIN
87 --plugins PLUGIN=arg1,arg2,...
88 --plugin PLUGIN
89 --plugin +App::Yath::Plugin::PLUGIN
90 --plugin PLUGIN=arg1,arg2,...
91 -pPLUGIN
92 --no-plugins
93 Load a yath plugin.
94
95 Can be specified multiple times
96
97 COMMAND OPTIONS
98 Cover Options
99
100 --cover-aggregator ByTest
101 --cover-aggregator ByRun
102 --cover-aggregator +Custom::Aggregator
103 --cover-agg ByTest
104 --cover-agg ByRun
105 --cover-agg +Custom::Aggregator
106 --no-cover-aggregator
107 Choose a custom aggregator subclass
108
109 --cover-class ARG
110 --cover-class=ARG
111 --no-cover-class
112 Choose a Test2::Plugin::Cover subclass
113
114 --cover-dirs ARG
115 --cover-dirs=ARG
116 --cover-dir ARG
117 --cover-dir=ARG
118 --no-cover-dirs
119 NO DESCRIPTION - FIX ME
120
121 Can be specified multiple times
122
123 --cover-exclude-private
124 --no-cover-exclude-private
125 --cover-files
126 --no-cover-files
127 Use Test2::Plugin::Cover to collect coverage data for what files
128 are touched by what tests. Unlike Devel::Cover this has very little
129 performance impact (About 4% difference)
130
131 --cover-from path/to/log.jsonl
132 --cover-from http://example.com/coverage
133 --cover-from path/to/coverage.jsonl
134 --no-cover-from
135 This can be a test log, a coverage dump (old style json or new
136 jsonl format), or a url to any of the previous. Tests will not be
137 run if the file/url is invalid.
138
139 --cover-from-type json
140 --cover-from-type jsonl
141 --cover-from-type log
142 --no-cover-from-type
143 File type for coverage source. Usually it can be detected, but when
144 it cannot be you should specify. "json" is old style single-blob
145 coverage data, "jsonl" is the new by-test style, "log" is a logfile
146 from a previous run.
147
148 --cover-manager My::Coverage::Manager
149 --no-cover-manager
150 Coverage 'from' manager to use when coverage data does not provide
151 one
152
153 --cover-maybe-from path/to/log.jsonl
154 --cover-maybe-from http://example.com/coverage
155 --cover-maybe-from path/to/coverage.jsonl
156 --no-cover-maybe-from
157 This can be a test log, a coverage dump (old style json or new
158 jsonl format), or a url to any of the previous. Tests will coninue
159 if even if the coverage file/url is invalid.
160
161 --cover-maybe-from-type json
162 --cover-maybe-from-type jsonl
163 --cover-maybe-from-type log
164 --no-cover-maybe-from-type
165 Same as "from_type" but for "maybe_from". Defaults to "from_type"
166 if that is specified, otherwise auto-detect
167
168 --cover-metrics
169 --no-cover-metrics
170 --cover-types ARG
171 --cover-types=ARG
172 --cover-type ARG
173 --cover-type=ARG
174 --no-cover-types
175 NO DESCRIPTION - FIX ME
176
177 Can be specified multiple times
178
179 --cover-write
180 --cover-write=coverage.jsonl
181 --cover-write=coverage.json
182 --no-cover-write
183 Create a json or jsonl file of all coverage data seen during the
184 run (This implies --cover-files).
185
186 Git Options
187
188 --git-change-base master
189 --git-change-base HEAD^
190 --git-change-base df22abe4
191 --no-git-change-base
192 Find files changed by all commits in the current branch from most
193 recent stopping when a commit is found that is also present in the
194 history of the branch/commit specified as the change base.
195
196 Help and Debugging
197
198 --dummy
199 -d
200 --no-dummy
201 Dummy run, do not actually execute anything
202
203 Can also be set with the following environment variables:
204 "T2_HARNESS_DUMMY"
205
206 --help
207 -h
208 --no-help
209 exit after showing help information
210
211 --interactive
212 -i
213 --no-interactive
214 Use interactive mode, 1 test at a time, stdin forwarded to it
215
216 --keep-dirs
217 --keep_dir
218 -k
219 --no-keep-dirs
220 Do not delete directories when done. This is useful if you want to
221 inspect the directories used for various commands.
222
223 --procname-prefix ARG
224 --procname-prefix=ARG
225 --no-procname-prefix
226 Add a prefix to all proc names (as seen by ps).
227
228 YathUI Options
229
230 --yathui-api-key ARG
231 --yathui-api-key=ARG
232 --no-yathui-api-key
233 Yath-UI API key. This is not necessary if your Yath-UI instance is
234 set to single-user
235
236 --yathui-db
237 --no-yathui-db
238 Add the YathUI DB renderer in addition to other renderers
239
240 --yathui-grace
241 --no-yathui-grace
242 If yath cannot connect to yath-ui it normally throws an error, use
243 this to make it fail gracefully. You get a warning, but things keep
244 going.
245
246 --yathui-long-duration 10
247 --no-yathui-long-duration
248 Minimum duration length (seconds) before a test goes from MEDIUM to
249 LONG
250
251 --yathui-medium-duration 5
252 --no-yathui-medium-duration
253 Minimum duration length (seconds) before a test goes from SHORT to
254 MEDIUM
255
256 --yathui-mode summary
257 --yathui-mode qvf
258 --yathui-mode qvfd
259 --yathui-mode complete
260 --no-yathui-mode
261 Set the upload mode (default 'qvfd')
262
263 --yathui-only
264 --no-yathui-only
265 Only use the YathUI renderer
266
267 --yathui-only-db
268 --no-yathui-only-db
269 Only use the YathUI DB renderer
270
271 --yathui-port 8080
272 --no-yathui-port
273 Port to use when running a local server
274
275 --yathui-port-command get_port.sh
276 --yathui-port-command get_port.sh --pid $$
277 --no-yathui-port-command
278 Use a command to get a port number. "$$" will be replaced with the
279 PID of the yath process
280
281 --yathui-project ARG
282 --yathui-project=ARG
283 --no-yathui-project
284 The Yath-UI project for your test results
285
286 --yathui-render
287 --no-yathui-render
288 Add the YathUI renderer in addition to other renderers
289
290 --yathui-resources
291 --yathui-resources=5
292 --no-yathui-resources
293 Send resource info (for supported resources) to yathui at the
294 specified interval in seconds (5 if not specified)
295
296 --yathui-retry
297 --no-yathui-retry
298 How many times to try an operation before giving up
299
300 Can be specified multiple times
301
302 --yathui-schema PostgreSQL
303 --yathui-schema MySQL
304 --yathui-schema MySQL56
305 --no-yathui-schema
306 What type of DB/schema to use when using a temporary database
307
308 --yathui-url http://my-yath-ui.com/...
309 --uri http://my-yath-ui.com/...
310 --no-yathui-url
311 Yath-UI url
312
313 --yathui-user ARG
314 --yathui-user=ARG
315 --no-yathui-user
316 Username to attach to the data sent to the db
317
318 --yathui-db-buffering none
319 --yathui-db-buffering job
320 --yathui-db-buffering diag
321 --yathui-db-buffering run
322 --no-yathui-db-buffering
323 Type of buffering to use, if "none" then events are written to the
324 db one at a time, which is SLOW
325
326 --yathui-db-config ARG
327 --yathui-db-config=ARG
328 --no-yathui-db-config
329 Module that implements 'MODULE->yath_ui_config(%params)' which
330 should return a Test2::Harness::UI::Config instance.
331
332 --yathui-db-coverage
333 --no-yathui-db-coverage
334 Pull coverage data directly from the database (default: off)
335
336 --yathui-db-driver Pg
337 --yathui-db-drivermysql
338 --yathui-db-driverMariaDB
339 --no-yathui-db-driver
340 DBI Driver to use
341
342 --yathui-db-dsn ARG
343 --yathui-db-dsn=ARG
344 --no-yathui-db-dsn
345 DSN to use when connecting to the db
346
347 --yathui-db-duration-limit ARG
348 --yathui-db-duration-limit=ARG
349 --no-yathui-db-duration-limit
350 Limit the number of runs to look at for durations data (default:
351 10)
352
353 --yathui-db-durations
354 --no-yathui-db-durations
355 Pull duration data directly from the database (default: off)
356
357 --yathui-db-flush-interval 2
358 --yathui-db-flush-interval 1.5
359 --no-yathui-db-flush-interval
360 When buffering DB writes, force a flush when an event is recieved
361 at least N seconds after the last flush.
362
363 --yathui-db-host ARG
364 --yathui-db-host=ARG
365 --no-yathui-db-host
366 hostname to use when connecting to the db
367
368 --yathui-db-name ARG
369 --yathui-db-name=ARG
370 --no-yathui-db-name
371 Name of the database to use for yathui
372
373 --yathui-db-pass ARG
374 --yathui-db-pass=ARG
375 --no-yathui-db-pass
376 Password to use when connecting to the db
377
378 --yathui-db-port ARG
379 --yathui-db-port=ARG
380 --no-yathui-db-port
381 port to use when connecting to the db
382
383 --yathui-db-publisher ARG
384 --yathui-db-publisher=ARG
385 --no-yathui-db-publisher
386 When using coverage or duration data, only use data uploaded by
387 this user
388
389 --yathui-db-socket ARG
390 --yathui-db-socket=ARG
391 --no-yathui-db-socket
392 socket to use when connecting to the db
393
394 --yathui-db-user ARG
395 --yathui-db-user=ARG
396 --no-yathui-db-user
397 Username to use when connecting to the db
398
399 spawn options
400
401 --copy-env HOME
402 --copy-env SHELL
403 --copy-env /PERL_.*/i
404 -e HOME
405 -e SHELL
406 -e /PERL_.*/i
407 --no-copy-env
408 Specify environment variables to pass along with their current
409 values, can also use a regex
410
411 Can be specified multiple times
412
413 --env-var VAR=VAL
414 -EVAR=VAL
415 -E VAR=VAL
416 --no-env-var
417 Set environment variables for the spawn
418
419 Can be specified multiple times
420
421 --stage foo
422 -s foo
423 --no-stage
424 Specify the stage to be used for launching the script
425
427 The source code repository for Test2-Harness can be found at
428 http://github.com/Test-More/Test2-Harness/.
429
431 Chad Granum <exodist@cpan.org>
432
434 Chad Granum <exodist@cpan.org>
435
437 Copyright 2023 Chad Granum <exodist7@gmail.com>.
438
439 This program is free software; you can redistribute it and/or modify it
440 under the same terms as Perl itself.
441
442 See http://dev.perl.org/licenses/
443
444
445
446perl v5.38.0 2023-10-04 App::Yath::Command::spawn(3)