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 it 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 YathUI Options
224
225 --yathui-api-key ARG
226 --yathui-api-key=ARG
227 --no-yathui-api-key
228 Yath-UI API key. This is not necessary if your Yath-UI instance is
229 set to single-user
230
231 --yathui-db
232 --no-yathui-db
233 Add the YathUI DB renderer in addition to other renderers
234
235 --yathui-grace
236 --no-yathui-grace
237 If yath cannot connect to yath-ui it normally throws an error, use
238 this to make it fail gracefully. You get a warning, but things keep
239 going.
240
241 --yathui-long-duration 10
242 --no-yathui-long-duration
243 Minimum duration length (seconds) before a test goes from MEDIUM to
244 LONG
245
246 --yathui-medium-duration 5
247 --no-yathui-medium-duration
248 Minimum duration length (seconds) before a test goes from SHORT to
249 MEDIUM
250
251 --yathui-mode summary
252 --yathui-mode qvf
253 --yathui-mode qvfd
254 --yathui-mode complete
255 --no-yathui-mode
256 Set the upload mode (default 'qvfd')
257
258 --yathui-only
259 --no-yathui-only
260 Only use the YathUI renderer
261
262 --yathui-only-db
263 --no-yathui-only-db
264 Only use the YathUI DB renderer
265
266 --yathui-port 8080
267 --no-yathui-port
268 Port to use when running a local server
269
270 --yathui-port-command get_port.sh
271 --yathui-port-command get_port.sh --pid $$
272 --no-yathui-port-command
273 Use a command to get a port number. "$$" will be replaced with the
274 PID of the yath process
275
276 --yathui-project ARG
277 --yathui-project=ARG
278 --no-yathui-project
279 The Yath-UI project for your test results
280
281 --yathui-render
282 --no-yathui-render
283 Add the YathUI renderer in addition to other renderers
284
285 --yathui-retry
286 --no-yathui-retry
287 How many times to try an operation before giving up
288
289 Can be specified multiple times
290
291 --yathui-schema PostgreSQL
292 --yathui-schema MySQL
293 --yathui-schema MySQL56
294 --no-yathui-schema
295 What type of DB/schema to use when using a temporary database
296
297 --yathui-url http://my-yath-ui.com/...
298 --uri http://my-yath-ui.com/...
299 --no-yathui-url
300 Yath-UI url
301
302 --yathui-user ARG
303 --yathui-user=ARG
304 --no-yathui-user
305 Username to attach to the data sent to the db
306
307 --yathui-db-buffering none
308 --yathui-db-buffering job
309 --yathui-db-buffering diag
310 --yathui-db-buffering run
311 --no-yathui-db-buffering
312 Type of buffering to use, if "none" then events are written to the
313 db one at a time, which is SLOW
314
315 --yathui-db-config ARG
316 --yathui-db-config=ARG
317 --no-yathui-db-config
318 Module that implements 'MODULE->yath_ui_config(%params)' which
319 should return a Test2::Harness::UI::Config instance.
320
321 --yathui-db-coverage
322 --no-yathui-db-coverage
323 Pull coverage data directly from the database (default: off)
324
325 --yathui-db-driver Pg
326 --yathui-db-drivermysql
327 --yathui-db-driverMariaDB
328 --no-yathui-db-driver
329 DBI Driver to use
330
331 --yathui-db-dsn ARG
332 --yathui-db-dsn=ARG
333 --no-yathui-db-dsn
334 DSN to use when connecting to the db
335
336 --yathui-db-durations
337 --no-yathui-db-durations
338 Pull duration data directly from the database (default: off)
339
340 --yathui-db-flush-interval 2
341 --yathui-db-flush-interval 1.5
342 --no-yathui-db-flush-interval
343 When buffering DB writes, force a flush when an event is recieved
344 at least N seconds after the last flush.
345
346 --yathui-db-host ARG
347 --yathui-db-host=ARG
348 --no-yathui-db-host
349 hostname to use when connecting to the db
350
351 --yathui-db-name ARG
352 --yathui-db-name=ARG
353 --no-yathui-db-name
354 Name of the database to use for yathui
355
356 --yathui-db-pass ARG
357 --yathui-db-pass=ARG
358 --no-yathui-db-pass
359 Password to use when connecting to the db
360
361 --yathui-db-port ARG
362 --yathui-db-port=ARG
363 --no-yathui-db-port
364 port to use when connecting to the db
365
366 --yathui-db-publisher ARG
367 --yathui-db-publisher=ARG
368 --no-yathui-db-publisher
369 When using coverage or duration data, only use data uploaded by
370 this user
371
372 --yathui-db-socket ARG
373 --yathui-db-socket=ARG
374 --no-yathui-db-socket
375 socket to use when connecting to the db
376
377 --yathui-db-user ARG
378 --yathui-db-user=ARG
379 --no-yathui-db-user
380 Username to use when connecting to the db
381
382 spawn options
383
384 --copy-env HOME
385 --copy-env SHELL
386 --copy-env /PERL_.*/i
387 -e HOME
388 -e SHELL
389 -e /PERL_.*/i
390 --no-copy-env
391 Specify environment variables to pass along with their current
392 values, can also use a regex
393
394 Can be specified multiple times
395
396 --env-var VAR=VAL
397 -EVAR=VAL
398 -E VAR=VAL
399 --no-env-var
400 Set environment variables for the spawn
401
402 Can be specified multiple times
403
404 --stage foo
405 -s foo
406 --no-stage
407 Specify the stage to be used for launching the script
408
410 The source code repository for Test2-Harness can be found at
411 http://github.com/Test-More/Test2-Harness/.
412
414 Chad Granum <exodist@cpan.org>
415
417 Chad Granum <exodist@cpan.org>
418
420 Copyright 2021 Chad Granum <exodist7@gmail.com>.
421
422 This program is free software; you can redistribute it and/or modify it
423 under the same terms as Perl itself.
424
425 See http://dev.perl.org/licenses/
426
427
428
429perl v5.34.0 2021-11-05 App::Yath::Command::spawn(3)