The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

testd - watch for tests needing running and run them

VERSION

version 0.001

USAGE

testd

Requires that you have a configured autodiscover value in your ~/elastest.conf.

You can also control behavior via the [testd] section:

    [testd]
    no_daemon=1
    max_workers=3
    [queue]
    granularity=5

The above configuration would run without daemonizing, 3 workers and 5 tests at a time per worker (max).

When testd is finished running all the available tests for a given configuration, it would be inefficient to simply wait however long it takes for new jobs to come in.

As such it accepts provisioner classes in your ~/elastest.conf, and will attempt to provision the machine to satisfy the jobs available. For example:

        [client]
        provisioner=Git,Perl
        [provisioner]
        branch=master

Would tell testd it can:

Pull to the latest version of code to satisfy test plans of versions that currently cannot be satisfied.
Install and use a different version of perl via perlbrew to satisfy plans with platforms that cannot currently be satisfied.

Similarly, it can run tests differently by providing a different runner class in your ~/elastest.conf:

        [client]
        runner=Karma
        [runner]
        args=-j2

By default prove is used as the runner.

SUBROUTINES

main

Runs the program and parses arguments.

try_to_provision(@provisioners)

Figure out if there are any new jobs we can't currently satisfy, and then if we can provision to satisfy the job.

Then actually do the provisioning.

worker($conf,$queue)

The worker process, which will grab some jobs and then run them. The caller should fork before executing this.

daemonify

I am purposely not having a PID file, logging or any other facilities you can get with start-stop-daemon. A service file will be provided in /service.

AUTHOR

George S. Baugh <teodesian@cpan.org>

SOURCE

The development version is on github at http://https://github.com/teodesian/App-Prove-Elasticsearch and may be cloned from git://https://github.com/teodesian/App-Prove-Elasticsearch.git

COPYRIGHT AND LICENSE

This software is copyright (c) 2018 by George S. Baugh.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.