buildtest.executors.base
¶
BuildExecutor: manager for test executors
Module Contents¶
Classes¶
|
The BaseExecutor is an abstract base class for all executors. All |
-
class
buildtest.executors.base.
BaseExecutor
(name, settings, config_opts)¶ The BaseExecutor is an abstract base class for all executors. All executors must have a listing of steps and dryrun_steps
-
steps
= ['setup', 'run']¶
-
type
= base¶
-
__repr__
(self)¶ Return repr(self).
-
__str__
(self)¶ Return str(self).
-
check_regex
(self, regex)¶ 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.- Parameters
regex (str) – Regular expression object defined in Buildspec file
- Returns
A boolean return True/False based on if re.search is successful or not
- Return type
bool
-
check_test_state
(self)¶ This method is responsible for detecting state of test (PASS/FAIL) based on returncode or regular expression.
-
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.
-
write_testresults
(self, out, err)¶ This method writes test results into output and error file.
- Parameters
out (list) – content of output stream
err (list) – content of error stream
-