Home | Trees | Indices | Help |
---|
|
A 'ExecutionEngine' executes tests.
A 'ExecutionEngine' object handles the execution of a collection of tests.
This class schedules the tests across one or more targets.
The shedule is determined dynamically as the tests are executed based on which targets are idle and which are not. Therefore, the testing load should be reasonably well balanced, even across a heterogeneous network of testing machines.
|
|||
__TestStatus A '__TestStatus' indicates whether or not a test has been run. |
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
|||
__TARGET_IDLE = "IDLE"
|
|||
__TARGET_BUSY = "BUSY"
|
|||
__TARGET_STARVING = "STARVING"
|
|
Set up a test run. 'database' -- The 'Database' containing the tests that will be run. 'test_ids' -- A sequence of IDs of tests to run. Where possible, the tests are started in the order specified. 'context' -- The context object to use when running tests. 'targets' -- A sequence of 'Target' objects, representing targets on which tests may be run. 'result_streams' -- A sequence of 'ResultStream' objects. Each stream will be provided with results as they are available. 'expectations' -- If not 'None', an ExpectationDatabase object. |
Request that the execution engine stop executing tests. Request that the execution thread be terminated. Termination may take some time; tests that are already running will continue to run, for example. |
Returns true if termination has been requested. returns -- True if no further tests should be executed. If the value is -1, the execution engine should simply terminate gracefully. |
Run the tests. This method runs the tests specified in the __init__ function. returns -- True if any tests had unexpected outcomes. |
Add an input handler for 'fd'. 'fd' -- A file descriptor, open for reading. 'function' -- A callable object taking a single parameter. The execution engine will periodically monitor 'fd'. When input is available, it will call 'function' passing it 'fd'. |
Run a test on 'target' 'target' -- The 'Target' on which the test should be run. returns -- True, iff a test could be found to run on 'target'. False otherwise. |
Return a test that is ready to run. 'target' -- The 'Target' on which the test will run. returns -- the 'TestDescriptor' for the next available ready test, or 'None' if no test could be found that will run on 'target'. If a test with unsatisfied prerequisites is encountered, the test will be pushed on the stack and the prerequisites processed recursively. |
Adds 'test_id' to the stack of current tests. returns -- True if the test was added to the stack; false if the test could not be loaded. In the latter case, an 'UNTESTED' result is recorded for the test. |
A a test to the appropriate target pattern queue. 'descriptor' -- A 'TestDescriptor'. Adds the test to the target pattern queue indicated in the descriptor. |
Return pending prerequisite tests for 'descriptor'. 'descriptor' -- A 'TestDescriptor'. returns -- A list of prerequisite test ids that have to complete, or 'None' if one of the prerequisites had an unexpected outcome. |
Report the result of running a test or resource. 'result' -- A 'Result' object representing the result of running a test or resource. |
See if any of the targets have completed a task. 'wait' -- If false, this function returns immediately if there is no available response. If 'wait' is true, this function continues to wait until a response is available. returns -- True iff a response was received. |
Add a 'Result' indicating that 'test_name' was not run. 'test_name' -- The label for the test that could not be run. 'cause' -- A string explaining why the test could not be run. 'annotations' -- A map from strings to strings giving additional annotations for the result. 'exc_info' -- If this test could not be tested due to a thrown exception, 'exc_info' is the result of 'sys.exc_info()' when the exception was caught. 'None' otherwise. |
Return the 'TestDescriptor' for 'test_id'. returns -- The 'TestDescriptor' for 'test_id', or 'None' if the descriptor could not be loaded. If the database cannot load the descriptor, an 'UNTESTED' result is recorded for 'test_id'. |
Write a trace 'message'. 'message' -- A string to be output as a trace message. |
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Fri Dec 23 12:30:41 2011 | http://epydoc.sourceforge.net |