NAME
App::Prove::Plugin::Distributed - an App::Prove plugin to distribute test jobs using client and server model.
VERSION
Version 0.06
SYNOPSIS
# Default workers with L<IPC::Open3> as worker processes.
prove -PDistributed -j2 t/
# Distributed jobs with LSF workers.
prove -PDistributed --distributed-type=LSF -j2 t/
# Distributed jobs with SSH workers.
prove -PDistributed --distributed-type=SSH -j2 --host=host1,host2 t/
# Distributed jobs with PBS workers using L<PBS::Client>. Note: This is not tested yet.
prove -PDistributed --distributed-type=PBS -j2 t/
DESCRIPTION
A plugin for App::Prove to distribute job. The core implementation of the plugin is to provide a easy interface and functionality to extend the use of any distribution method.
The initiate release of this module was using the idea from FCGI::Daemon that load perl code file using "do" perl function to the worker perl process to execute tests.
Currently, the distribution comes with a few implementation of distribution methods to initiate external "worker" processes. Shown below is the list.
L<IPC::Open3>
LSF
SSH
L<PBS::Client> * Note: PBS implemetation is not tested yet.
FUNCTIONS
Basic functions.
load
Load the plugin configuration. It will setup all of the tests to be distributed through the TAP::Parser::SourceHandler::Worker source handler class.
extra_used_libs
Return a list of paths in @INC that are not part of the compiled-in lsit of paths
start_server
Start a server to serve the test.
Parameter is the contoller peer address.
trigger_end_blocks_before_child_process_exit
Trigger END blocks before the child process exit. The main reason is to have the Test::Builder to have change to finish up.
Plugin Command Line Options
manager
Option only for the worker process to indicate the control process that started the worder. The format is hostname
:port
Example, --manager=myhostname:1234
distributed-type
Specify the distribution method. Currently, the valid values are shown below.
LSF
PBS
SSH
start-up
Start up script to load to the worker process before running test. It is only without the --detach option.
Example,
--start-up=/dir/path/setup_my_enviroment_variable.pl
tear-down
Currently, the tear-down option will not be run.
error-log
Capture any error from the worker. The input is the file path that the worker can write to.
detach
Detach the executing of test from the worker process. Currently, the test job will be executed with exec
perl function.
Worker Specific Options
Each worker can have its specific options. Please refer to the particular source handler worker module for detail.
BUGS
Currently, the only known bug is when running in the worker perl process without using detach
option with the empty string regular expression match. Shown below is the example code that will generate the bug. For more information please check out the test t/sample-tests/empty_string_problem.
ok('good=bad' =~ m/^.*?=.*/, 'test');
ok('test' =~ m//, 'this will failed before the previous regex match with a "?=" regex match. I have no way to reset back the previous regex change the regex engine unless I put it in its scope.');
AUTHORS
Shin Leong <lsf@cpan.org>
LICENCE AND COPYRIGHT
Copyright (c) 2012 Shin Leong <lsf@cpan.org>
. All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.12.4 or, at your option, any later version of Perl 5 you may have available. See perlartistic.