App-Prove-Plugin-Distributed

 view release on metacpan or  search on metacpan

lib/TAP/Parser/Iterator/Worker/SSH.pm  view on Meta::CPAN

For your specific command, you can subclass this to put your command in this method.

=cut

sub initialize_worker_command {
    my $self     = shift;
    my $commands = $self->SUPER::initialize_worker_command;
    my $hostname = TAP::Parser::SourceHandler::Worker::SSH->get_next_host();
    my $cwd      = File::Spec->rel2abs('.');

    my $escaped_command = "cd $cwd;" . $commands->[0];
    $escaped_command =~ s/'/'"'"'/g;
    $commands->[0] = "ssh $hostname '" . $escaped_command . "'";
    $self->{host} = $hostname;
    return $commands;
}

1;

__END__

##############################################################################



( run in 0.402 second using v1.01-cache-2.11-cpan-c21f80fb71c )