Package qm :: Package test :: Package classes :: Module process_target :: Class ProcessTarget
[hide private]
[frames] | no frames]

Class ProcessTarget
source code

         object --+        
                  |        
extension.Extension --+    
                      |    
          target.Target --+
                          |
                         ProcessTarget
Known Subclasses:
rsh_target.RSHTarget

A 'ProcessTarget' runs tests in child processes.

Nested Classes [hide private]
QMTestExecutable A 'QMTestExecutable' redirects commands to a child process.

Inherited from extension.Extension: Type, __metaclass__


Instance Methods [hide private]
  IsIdle(self)
Return true if the target is idle.
  RunTest(self, descriptor, context)
Run the test given by 'test_id'.
  Start(self, response_queue, engine=None)
Start the target.
  Stop(self)
Stop the target.
  _GetInterpreter(self)
Return the interpreter to use.
  __ReadResults(self, fd)
Read results from one of the children.
  __init__(self, database, properties)
Construct a new 'ProcessTarget'.

Inherited from target.Target: GetDatabase, GetGroup, GetName, IsInGroup

Inherited from extension.Extension: GetClassName, GetExplicitArguments, MakeDomDocument, MakeDomElement, Write, __getattr__

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__


Class Variables [hide private]
_argument_dictionary A map from argument names to 'Field' instances.
_argument_list A list of all the 'Field's in this class.
arguments A list of the arguments to the extension class.
database_path  
processes  
qmtest  

Inherited from target.Target: group, kind, name

Inherited from object: __class__


Method Details [hide private]

IsIdle(self)

source code 

Return true if the target is idle.

returns -- True if the target is idle. If the target is idle, additional tasks may be assigned to it.
Overrides: target.Target.IsIdle

RunTest(self, descriptor, context)

source code 

Run the test given by 'test_id'.

'descriptor' -- The 'TestDescriptor' for the test.

'context' -- The 'Context' in which to run the test.
Overrides: target.Target.RunTest

Start(self, response_queue, engine=None)

source code 

Start the target.

'response_queue' -- The 'Queue' in which the results of test executions are placed.

'engine' -- The 'ExecutionEngine' that is starting the target, or 'None' if this target is being started without an 'ExecutionEngine'.
Overrides: target.Target.Start

Stop(self)

source code 

Stop the target.

postconditions -- The target may no longer be used.
Overrides: target.Target.Stop

_GetInterpreter(self)

source code 

Return the interpreter to use.

returns -- A list giving the path to an interpreter, and arguments to provide the interpreter. This interpreter is used to run QMTest. If '[]' is returned, then no intepreter is used.

__ReadResults(self, fd)

source code 

Read results from one of the children.

'fd' -- The descriptor from which the results should be read.

__init__(self, database, properties)
(Constructor)

source code 

Construct a new 'ProcessTarget'.

'database' -- The 'Database' containing the tests that will be run.

'properties' -- A dictionary mapping strings (property names) to strings (property values).
Overrides: target.Target.__init__

Class Variable Details [hide private]

_argument_dictionary

A map from argument names to 'Field' instances.

A map from the names of arguments for this class to the corresponding 'Field'.
Value:
{'database_path': <<class 'qm.fields.TextField'> database_path>,
 'group': <<class 'qm.fields.TextField'> group>,
 'name': <<class 'qm.fields.TextField'> name>,
 'processes': <<class 'qm.fields.IntegerField'> processes>,
 'qmtest': <<class 'qm.fields.TextField'> qmtest>}                     
      

_argument_list

A list of all the 'Field's in this class.

This list combines the complete list of 'arguments'. 'Field's appear in the order reached by a pre-order breadth-first traversal of the hierarchy, starting from the most derived class.
Value:
[<<class 'qm.fields.TextField'> qmtest>,
 <<class 'qm.fields.TextField'> database_path>,
 <<class 'qm.fields.IntegerField'> processes>,
 <<class 'qm.fields.TextField'> group>,
 <<class 'qm.fields.TextField'> name>]                                 
      

arguments

A list of the arguments to the extension class.

Each element of this list should be an instance of 'Field'. The 'Field' instance describes the argument.

Derived classes may redefine this class variable. However, derived classes should not explicitly include the arguments from base classes; QMTest will automatically combine all the arguments found throughout the class hierarchy.
Value:
[<<class 'qm.fields.IntegerField'> processes>,
 <<class 'qm.fields.TextField'> database_path>,
 <<class 'qm.fields.TextField'> qmtest>]                               
      

database_path

Value:
''                                                                     
      

processes

Value:
1                                                                     
      

qmtest

Value:
''