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-retry
291 --no-yathui-retry
292 How many times to try an operation before giving up
293
294 Can be specified multiple times
295
296 --yathui-schema PostgreSQL
297 --yathui-schema MySQL
298 --yathui-schema MySQL56
299 --no-yathui-schema
300 What type of DB/schema to use when using a temporary database
301
302 --yathui-url http://my-yath-ui.com/...
303 --uri http://my-yath-ui.com/...
304 --no-yathui-url
305 Yath-UI url
306
307 --yathui-user ARG
308 --yathui-user=ARG
309 --no-yathui-user
310 Username to attach to the data sent to the db
311
312 --yathui-db-buffering none
313 --yathui-db-buffering job
314 --yathui-db-buffering diag
315 --yathui-db-buffering run
316 --no-yathui-db-buffering
317 Type of buffering to use, if "none" then events are written to the
318 db one at a time, which is SLOW
319
320 --yathui-db-config ARG
321 --yathui-db-config=ARG
322 --no-yathui-db-config
323 Module that implements 'MODULE->yath_ui_config(%params)' which
324 should return a Test2::Harness::UI::Config instance.
325
326 --yathui-db-coverage
327 --no-yathui-db-coverage
328 Pull coverage data directly from the database (default: off)
329
330 --yathui-db-driver Pg
331 --yathui-db-drivermysql
332 --yathui-db-driverMariaDB
333 --no-yathui-db-driver
334 DBI Driver to use
335
336 --yathui-db-dsn ARG
337 --yathui-db-dsn=ARG
338 --no-yathui-db-dsn
339 DSN to use when connecting to the db
340
341 --yathui-db-duration-limit ARG
342 --yathui-db-duration-limit=ARG
343 --no-yathui-db-duration-limit
344 Limit the number of runs to look at for durations data (default:
345 10)
346
347 --yathui-db-durations
348 --no-yathui-db-durations
349 Pull duration data directly from the database (default: off)
350
351 --yathui-db-flush-interval 2
352 --yathui-db-flush-interval 1.5
353 --no-yathui-db-flush-interval
354 When buffering DB writes, force a flush when an event is recieved
355 at least N seconds after the last flush.
356
357 --yathui-db-host ARG
358 --yathui-db-host=ARG
359 --no-yathui-db-host
360 hostname to use when connecting to the db
361
362 --yathui-db-name ARG
363 --yathui-db-name=ARG
364 --no-yathui-db-name
365 Name of the database to use for yathui
366
367 --yathui-db-pass ARG
368 --yathui-db-pass=ARG
369 --no-yathui-db-pass
370 Password to use when connecting to the db
371
372 --yathui-db-port ARG
373 --yathui-db-port=ARG
374 --no-yathui-db-port
375 port to use when connecting to the db
376
377 --yathui-db-publisher ARG
378 --yathui-db-publisher=ARG
379 --no-yathui-db-publisher
380 When using coverage or duration data, only use data uploaded by
381 this user
382
383 --yathui-db-socket ARG
384 --yathui-db-socket=ARG
385 --no-yathui-db-socket
386 socket to use when connecting to the db
387
388 --yathui-db-user ARG
389 --yathui-db-user=ARG
390 --no-yathui-db-user
391 Username to use when connecting to the db
392
393 spawn options
394
395 --copy-env HOME
396 --copy-env SHELL
397 --copy-env /PERL_.*/i
398 -e HOME
399 -e SHELL
400 -e /PERL_.*/i
401 --no-copy-env
402 Specify environment variables to pass along with their current
403 values, can also use a regex
404
405 Can be specified multiple times
406
407 --env-var VAR=VAL
408 -EVAR=VAL
409 -E VAR=VAL
410 --no-env-var
411 Set environment variables for the spawn
412
413 Can be specified multiple times
414
415 --stage foo
416 -s foo
417 --no-stage
418 Specify the stage to be used for launching the script
419
421 The source code repository for Test2-Harness can be found at
422 http://github.com/Test-More/Test2-Harness/.
423
425 Chad Granum <exodist@cpan.org>
426
428 Chad Granum <exodist@cpan.org>
429
431 Copyright 2022 Chad Granum <exodist7@gmail.com>.
432
433 This program is free software; you can redistribute it and/or modify it
434 under the same terms as Perl itself.
435
436 See http://dev.perl.org/licenses/
437
438
439
440perl v5.36.0 2022-09-08 App::Yath::Command::spawn(3)