Table of Contents

Class: ExecutionThread qm/test/execution_thread.py

A ExecutionThread executes tests in a separate thread.

A ExecutionThread is an ExecutionEngine that runs tests in a separate thread.

This class schedules the tests, plus the setup and cleanup of any resources they require, 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.

Base Classes   
Thread
ExecutionEngine
Methods   
RequestTermination
_IsTerminationRequested
__init__
run
  RequestTermination 
RequestTermination ( self )

Request termination.

Request that the execution thread be terminated. This may take some time; tests that are already running will continue to run, for example.

  _IsTerminationRequested 
_IsTerminationRequested ( self )

Returns true if termination has been requested.

return
True if Terminate has been called.
  __init__ 
__init__ (
        self,
        database,
        test_ids,
        context,
        targets,
        result_streams=None,
        expectations=None,
        )

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. This thread will not perform any locking of these streams as they are written to; each stream must provide its own synchronization if it will be accessed before run returns.
expectations
If not None, a dictionary mapping test IDs to expected outcomes.
  run 
run ( self )

Run the tests.

This method runs the tests specified in the __init__ function.


Table of Contents

This document was automatically generated on Mon Jan 3 09:42:29 2005 by HappyDoc version 2.1