avocado.core.runners package¶
Submodules¶
avocado.core.runners.avocado_instrumented module¶
-
class
avocado.core.runners.avocado_instrumented.AvocadoInstrumentedTestRunner(runnable)¶ Bases:
avocado.core.nrunner.BaseRunnerRunner 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:
avocado.core.nrunner.BaseRunnerApp-
PROG_DESCRIPTION= 'nrunner application for avocado-instrumented tests'¶
-
PROG_NAME= 'avocado-runner-avocado-instrumented'¶
-
RUNNABLE_KINDS_CAPABLE= {'avocado-instrumented': <class 'avocado.core.runners.avocado_instrumented.AvocadoInstrumentedTestRunner'>}¶
-
-
class
avocado.core.runners.avocado_instrumented.RunnerLogHandler(queue, message_type)¶ Bases:
logging.HandlerRunner logger which will put every log to the runner queue
Parameters: - queue (multiprocessing.SimpleQueue) – queue for the runner messages
- message_type (string) – type of the log
-
emit(record)¶ Do whatever it takes to actually log the specified logging record.
This version is intended to be implemented by subclasses and so raises a NotImplementedError.
-
class
avocado.core.runners.avocado_instrumented.StreamToQueue(queue, message_type)¶ Bases:
objectRunner Stream which will transfer every to the runner queue
Parameters: - queue (multiprocessing.SimpleQueue) – queue for the runner messages
- message_type (string) – type of the log
-
flush()¶
-
write(buf)¶
-
avocado.core.runners.avocado_instrumented.main()¶
avocado.core.runners.tap module¶
-
class
avocado.core.runners.tap.RunnerApp(echo=<built-in function print>, prog=None, description=None)¶ Bases:
avocado.core.nrunner.BaseRunnerApp-
PROG_DESCRIPTION= 'nrunner application for executable tests that produce TAP'¶
-
PROG_NAME= 'avocado-runner-tap'¶
-
RUNNABLE_KINDS_CAPABLE= {'tap': <class 'avocado.core.runners.tap.TAPRunner'>}¶
-
-
class
avocado.core.runners.tap.TAPRunner(runnable)¶ Bases:
avocado.core.nrunner.ExecRunnerRunner 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()¶