buildtest.executors.base

BuildExecutor: manager for test executors

Module Contents

Classes

BaseExecutor

The BaseExecutor is an abstract base class for all executors.

class buildtest.executors.base.BaseExecutor(name, settings, site_configs, timeout=None, account=None, maxpendtime=None)[source]

The BaseExecutor is an abstract base class for all executors.

Initiate a base executor, meaning we provide a name (also held by the BuildExecutor base that holds it) and the loaded dictionary of config opts to parse.

Parameters:
  • name (str) – name of executor

  • setting (dict) – setting for a given executor defined in configuration file

  • site_configs (buildtest.config.SiteConfiguration) – Instance of SiteConfiguration class

  • timeout (str, optional) – Test timeout in number of seconds

  • maxpendtime (int, optional) – Maximum Pending Time until job is cancelled. The default is 1 day (86400s)

  • account (str, optional) – Account to use for job submission

  • maxpendtime – Maximum Pending Time until job is cancelled. The default is 1 day (86400s)

type = 'base'
default_maxpendtime = 86400
add_builder(builder)[source]

Add builder object to self.builders only if its of type BuilderBase

get_builder()[source]

Return a list of builders

load()[source]

Load a particular configuration based on the name. This method should set defaults for the executor, and will vary based on the class.

abstract run()[source]

The run step basically runs the build. This is run after setup so we are sure that the builder is defined. This is also where we set the result to return.

poll(builder)[source]
gather(builder)[source]

Gather Job detail after completion of job by invoking the builder method builder.job.gather(). We retrieve exit code, output file, error file and update builder metadata.

Parameters:

builder (buildtest.buildsystem.base.BuilderBase) – An instance object of BuilderBase type

_cancel_job_if_elapsedtime_exceeds_timeout(builder)[source]
_cancel_job_if_pendtime_exceeds_maxpendtime(builder)[source]
__str__()[source]

Return str(self).

__repr__()[source]

Return repr(self).