avocado.core.runners package
Subpackages
- avocado.core.runners.utils package
Submodules
avocado.core.runners.avocado_instrumented module
- class avocado.core.runners.avocado_instrumented.AvocadoInstrumentedTestRunner(runnable)
Bases:
BaseRunner
Runner for Avocado INSTRUMENTED tests
Runnable attributes usage:
uri: path to a test file, combined with an Avocado.Test inherited class name and method. The test file path and class and method names should be separated by a “:”. One example of a valid uri is “mytest.py:Class.test_method”.
args: not used
- DEFAULT_TIMEOUT = 86400
- run()
Runner main method
Yields dictionary as output, containing status as well as relevant information concerning the results.
- class avocado.core.runners.avocado_instrumented.RunnerApp(echo=<built-in function print>, prog=None, description=None)
Bases:
BaseRunnerApp
- PROG_DESCRIPTION = 'nrunner application for avocado-instrumented tests'
The description of the command line application given to the command line parser
- PROG_NAME = 'avocado-runner-avocado-instrumented'
The name of the command line application given to the command line parser
- RUNNABLE_KINDS_CAPABLE = {'avocado-instrumented': <class 'avocado.core.runners.avocado_instrumented.AvocadoInstrumentedTestRunner'>}
The types of runnables that this runner can handle. Dictionary key is a name, and value is a class that inherits from
BaseRunner
- avocado.core.runners.avocado_instrumented.main()
avocado.core.runners.requirement_asset module
- class avocado.core.runners.requirement_asset.RequirementAssetRunner(runnable)
Bases:
BaseRunner
Runner for requirements of type package
This runner handles the fetch of files using the Avocado Assets utility.
Runnable attributes usage:
kind: ‘requirement-asset’
uri: not used
args: not used
- kwargs:
name: the file name or uri (required)
asset_hash: hash of the file (optional)
algorithm: hash algorithm (optional)
locations: location(s) where the file can be fetched from (optional)
expire: time in seconds for the asset to expire (optional)
- run()
Runner main method
Yields dictionary as output, containing status as well as relevant information concerning the results.
- class avocado.core.runners.requirement_asset.RunnerApp(echo=<built-in function print>, prog=None, description=None)
Bases:
BaseRunnerApp
- PROG_DESCRIPTION = 'nrunner application for requirements of type asset'
The description of the command line application given to the command line parser
- PROG_NAME = 'avocado-runner-requirement-asset'
The name of the command line application given to the command line parser
- RUNNABLE_KINDS_CAPABLE = {'requirement-asset': <class 'avocado.core.runners.requirement_asset.RequirementAssetRunner'>}
The types of runnables that this runner can handle. Dictionary key is a name, and value is a class that inherits from
BaseRunner
- avocado.core.runners.requirement_asset.main()
avocado.core.runners.requirement_package module
- class avocado.core.runners.requirement_package.RequirementPackageRunner(runnable)
Bases:
BaseRunner
Runner for requirements of type package
This runner handles, the installation, verification and removal of packages using the avocado-software-manager.
Runnable attributes usage:
kind: ‘requirement-package’
uri: not used
args: not used
- kwargs:
name: the package name (required)
action: one of ‘install’, ‘check’, or ‘remove’ (optional, defaults to ‘install’)
- run()
Runner main method
Yields dictionary as output, containing status as well as relevant information concerning the results.
- class avocado.core.runners.requirement_package.RunnerApp(echo=<built-in function print>, prog=None, description=None)
Bases:
BaseRunnerApp
- PROG_DESCRIPTION = 'nrunner application for requirements of type package'
The description of the command line application given to the command line parser
- PROG_NAME = 'avocado-runner-requirement-package'
The name of the command line application given to the command line parser
- RUNNABLE_KINDS_CAPABLE = {'requirement-package': <class 'avocado.core.runners.requirement_package.RequirementPackageRunner'>}
The types of runnables that this runner can handle. Dictionary key is a name, and value is a class that inherits from
BaseRunner
- avocado.core.runners.requirement_package.main()
avocado.core.runners.sysinfo module
- class avocado.core.runners.sysinfo.PostSysInfo(config, sysinfo_config, queue, test_fail=False)
Bases:
PreSysInfo
Log different system properties after end event.
An event may be a job, a test, or any other event with a beginning and end.
- Parameters:
test_fail (bool) – flag for fail tests. Default False
- sysinfo_dir = 'sysinfo/post'
- class avocado.core.runners.sysinfo.PreSysInfo(config, sysinfo_config, queue)
Bases:
object
Log different system properties before start event.
An event may be a job, a test, or any other event with a beginning and end.
Set sysinfo collectibles.
- Parameters:
config (dict) – avocado configuration
sysinfo_config (dict) – dictionary with commands/tasks which should be performed during the sysinfo collection.
queue (multiprocessing.SimpleQueue) – queue for the runner messages
- collect()
Log all collectibles at the start of the event.
- property installed_pkgs
- sysinfo_dir = 'sysinfo/pre'
- class avocado.core.runners.sysinfo.RunnerApp(echo=<built-in function print>, prog=None, description=None)
Bases:
BaseRunnerApp
- PROG_DESCRIPTION = 'nrunner application for gathering sysinfo'
The description of the command line application given to the command line parser
- PROG_NAME = 'avocado-runner-sysinfo'
The name of the command line application given to the command line parser
- RUNNABLE_KINDS_CAPABLE = {'sysinfo': <class 'avocado.core.runners.sysinfo.SysinfoRunner'>}
The types of runnables that this runner can handle. Dictionary key is a name, and value is a class that inherits from
BaseRunner
- class avocado.core.runners.sysinfo.SysinfoRunner(runnable)
Bases:
BaseRunner
Runner for gathering sysinfo
Runnable attributes usage:
- uri: sysinfo type pre/post. This variable decides if the sysinfo is
collected before or after the test.
- kwargs: “sysinfo” dictionary with commands/tasks which should be
performed during the sysinfo collection.
- run()
Runner main method
Yields dictionary as output, containing status as well as relevant information concerning the results.
- avocado.core.runners.sysinfo.main()
avocado.core.runners.tap module
- class avocado.core.runners.tap.RunnerApp(echo=<built-in function print>, prog=None, description=None)
Bases:
BaseRunnerApp
- PROG_DESCRIPTION = 'nrunner application for executable tests that produce TAP'
The description of the command line application given to the command line parser
- PROG_NAME = 'avocado-runner-tap'
The name of the command line application given to the command line parser
- RUNNABLE_KINDS_CAPABLE = {'tap': <class 'avocado.core.runners.tap.TAPRunner'>}
The types of runnables that this runner can handle. Dictionary key is a name, and value is a class that inherits from
BaseRunner
- class avocado.core.runners.tap.TAPRunner(runnable)
Bases:
ExecTestRunner
Runner for standalone executables treated as TAP
When creating the Runnable, use the following attributes:
kind: should be ‘tap’;
uri: path to a binary to be executed as another process. This must provides a TAP output.
args: any runnable argument will be given on the command line to the binary given by path
kwargs: you can specify multiple key=val as kwargs. This will be used as environment variables to the process.
Example:
- runnable = Runnable(kind=’tap’,
uri=’tests/foo.sh’, ‘bar’, # arg 1 DEBUG=’false’) # kwargs 1 (environment)
- avocado.core.runners.tap.main()