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)

The BaseExecutor is an abstract base class for all executors.

type = base
__repr__(self)

Return repr(self).

__str__(self)

Return str(self).

_check_regex(self, builder)

This method conducts a regular expression check using re.search with regular expression defined in Buildspec. User must specify an output stream (stdout, stderr) to select when performing regex. In buildtest, this would read the .out or .err file based on stream and run the regular expression to see if there is a match. This method will return a boolean True indicates there is a match otherwise False if regex object not defined or re.search doesn’t find a match.

Parameters

builder (BuilderBase (subclass)) – instance of BuilderBase class

Returns

A boolean return True/False based on if re.search is successful or not

Return type

bool

_check_runtime(self, builder)

This method will return a boolean (True/False) based on runtime specified in buildspec and check with test runtime. User can specify both min and max, or just specify min or max.

_returncode_check(self, builder)

Check status check of returncode field if specified in status property.

Parameters

builder (BuilderBase (subclass)) – instance of BuilderBase class

check_test_state(self, builder)

This method is responsible for detecting state of test (PASS/FAIL) based on returncode or regular expression.

Parameters

builder (BuilderBase (subclass)) – instance of BuilderBase class

load(self)

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

run(self)

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.