Test2:...er::Job(3pm)
π NAME π
Test2::Harness::Runner::Job β literally the whole representation of a test job, bestie. It's a Perl module, and yeah, the manual page is Test2:...er::Job(3pm) (iconic name, we don't question it).
β¨ DESCRIPTION β¨
Okay so picture this: a test file queue item walks in πΆβοΈ, a run walks in πΆ, and runner settings walk in πΆ. This module takes alllll of that data and mashes it together β like, fully blends it β just to figure out what is actually needed to run a job. That's the whole gig. No cap. π
π METHODS π
Heads up bestie: this object subclasses Test2::Harness::IPC::Process. So some of the energy comes from up the family tree, iykyk. π³
$arrayref = $job->argsβ grab the arguments for the test πΈ either from the queue item, or from the run.$path = $job->bail_fileβ path to the events-file that gets used in case of a bail-out π$bool = $job->bailed_outβ true if the test job bailed out π$cat $job->categoryβ the process category, always'job'unless a subclass goes rogue and overrides it π$path = $job->ch_dirβ if this job first needs a change of directory before it runs, this hands you the path π@list = $job->cli_includesβ the list of includes for a command line launch of this job β¨@list = $job->cli_optionsβ the list of options for a command line launch of this job π$hashref = $job->env_varsβ get the environment variables to set when launching this job π$path = $job->out_fileβ the file where all STDOUT for the job gets written π$path = $job->err_fileβ the file where all STDERR for the job gets written π«£$path = $job->et_fileβ the file where event timeout notifications get written β°$path = $job->pet_fileβ the file where post exit timeout events get written πΎ$path = $job->event_dirβ the directory whereTest2::Formatter::Streamevents get written π$time = $job->event_timeoutβ the event timeout specification, if there even is one: first from the test queue item, then from the runner β³$time = $job->post_exit_timeoutβ the post exit timeout specification, if any: first from the test queue item, then from the runner β³$bool = $job->event_uuidsβ useTest2::Plugin::UUIDinside the test π$path = $job->fileβ the test file this job will be running πβοΈ$coderef = $job->fork_callbackβ if the job is gonna be launched via fork, use this callback π΄$path = $job->in_fileβ the file containing the STDIN to be provided to the test π₯@list = $job->includesβ paths to add to@INCfor the test π§$bool = $job->io_eventsβ true ifTest2::Plugin::IOEventsshould be used π$int = $job->is_tryβ this starts at0and gets incremented for every retry of the job π$path = $job->job_dirβ the temporary directory housing all the files related to this job while it runs π$uuid = $job->job_idβ the UUID for this job π@list = $job->loadβ modules to load when starting this job π¦@list = $job->load_importβ modules to load and import when starting this job π¦β¨$bool = $job->mem_usageβ true if theTest2::Plugin::MemUsageplugin should be used π§$path = $job->run_fileβ usually the same asrel_file, but you can specify an alternative file to actually run π$path = $job->rel_fileβ the relative path to the file π€οΈ$int = $job->retryβ how many times the test should be retried if it fails π$bool = $job->retry_isolatedβ true if the test should be retried in isolation if it fails π$run = $job->runβ theTest2::Harness::Runner::Runinstance π‘$path = $job->run_dirβ path to the temporary directory housing all the data about the run ποΈ$runner = $job->runnerβ theTest2::Harness::Runnerinstance π@list = $job->runner_includesβ the search path includes provided directly by the runner π$settings = $job->settingsβ theTest2::Harness::Settingsinstance βοΈ$bool = $job->smokeβ true if the test is a priority smoke test π₯$hashref = $job->spawn_paramsβ parameters forrun_cmd()inTest2::Harness::Util::IPCwhen launching this job. If the task has a"resource_skip"set (which means permanently unavailable resources π΅), the command will emit TAP to skip the test. And when the"--fail-on-resource-skip"runner option is enabled, the command will instead emit a TAP test failure π₯@list = $job->switchesβ the command line switches for perl when running this test πͺ$hashref = $job->taskβ task data from the queue π$path = $job->tmp_dirβ the temp dir created specifically for this job π§Ί$bool = $job->unsafe_incβ true if.should be added to@INCβ οΈ$bool = $job->use_forkβ true if this job should be launched via fork π΄$bool = $job->use_streamβ true if this job should useTest2::Formatter::Streamπ$bool = $job->use_timeoutβ true if this job should timeout due to lack of activity π΄$bool = $job->use_w_switchβ true if the"-w"switch should be used for this test π¨
π SOURCE π
The source code repository for Test2-Harness can be found at http://github.com/Test-More/Test2-Harness/. Go be nosy bestie, it's public π«Ά
π MAINTAINERS π
Chad Granum <exodist@cpan.org>
π AUTHORS π
Chad Granum <exodist@cpan.org>
πΈ COPYRIGHT πΈ
Copyright 2020 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 the whole page, periodt π
β¨ this was perl v5.40.1, dated 2026-05-10, from the Test2:...er::Job(3pm) manual β thanks for reading bestie, ily, go write 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