ScriptWriter
index
/local_disk/sherwood/RTT/Tools/RunTimeTester/RunTimeTester-00-00-93/src/ScriptWriter.py

ScriptWriter write is a base class for writing shell scripts to run the jobs.
The shell scripts are typically written to a run directory, and are submitted to a
queue from there.
 
The base class provides a default implementation.

 
Modules
       
logging
os

 
Classes
       
PBSTestScriptWriter
ScriptWriter
AthenaScriptWriter
RecExCommonScriptWriter
JiveXMLScriptWriter
TrigReleaseIDScriptWriter
TrigReleaseCaloScriptWriter
TriggerReleaseScriptWriter
KitValidationScriptWriter
MonitoringScriptWriter
NullScriptWriter
QAmetricsScriptWriter
RTTSelfTestScriptWriter
RTTTrivialJobScriptWriter
RuleCheckerScriptWriter

 
class AthenaScriptWriter(ScriptWriter)
     Methods defined here:
__init__(self, jDescriptor)
Provides a run script for Athena jobs
athenaCommand(self, release=830)
Command for running athena. from about 8.2.0, packages started switching to
using python scripts to run athena.
checkExtension(self, option)
commandLineFlags(self)
commandLineOptionLabel(self)
jobOptionsFile(self)
Returns the path to the job options file that is to be
tacked on the end of the athena command.
--- If DC1 or dataless job: just return the job options passed in <options> tag
--- If DC2 or BS data: return an RTT created job options that 'includes' the
user one in the <options> tag but then adds the data in the <dataset> tag(s)
to the appropriate Python class (DC2 = EventSelector.InputCollections,
BS = ByteStreamEventStorageInputSvc.FullFileName).
jobOptionsListHandler(self)
lsatlF(self, when)
poolInsertString(self)
runScript(self)
Default shell script for running a job.

 
class JiveXMLScriptWriter(RecExCommonScriptWriter)
    
Method resolution order:
JiveXMLScriptWriter
RecExCommonScriptWriter
AthenaScriptWriter
ScriptWriter

Methods defined here:
__init__(self, jDescriptor)

Methods inherited from RecExCommonScriptWriter:
G3flag(self)
athenaCommand(self, release=830)
add in flags to run on DC1
commandLineFlags(self)
dataSet(self)
runScript(self)

Methods inherited from AthenaScriptWriter:
checkExtension(self, option)
commandLineOptionLabel(self)
jobOptionsFile(self)
Returns the path to the job options file that is to be
tacked on the end of the athena command.
--- If DC1 or dataless job: just return the job options passed in <options> tag
--- If DC2 or BS data: return an RTT created job options that 'includes' the
user one in the <options> tag but then adds the data in the <dataset> tag(s)
to the appropriate Python class (DC2 = EventSelector.InputCollections,
BS = ByteStreamEventStorageInputSvc.FullFileName).
jobOptionsListHandler(self)
lsatlF(self, when)
poolInsertString(self)

 
class KitValidationScriptWriter(ScriptWriter)
     Methods defined here:
__init__(self, jDescriptor)
Obtain information pertaining to the job
kitValidationCommand(self)
Command for running KitValidation.
runScript(self)
Default shell script for running a job.

 
class MonitoringScriptWriter(ScriptWriter)
     Methods defined here:
__init__(self, jDescriptor)
runScript(self)

 
class NullScriptWriter(ScriptWriter)
     Methods defined here:
__init__(self, jDescriptor)
runScript(self)

 
class PBSTestScriptWriter
     Methods defined here:
__init__(self, jDescriptor)
runScript(self)

 
class QAmetricsScriptWriter(ScriptWriter)
     Methods defined here:
__init__(self, jDescriptor)
runScript(self)

 
class RTTSelfTestScriptWriter(ScriptWriter)
     Methods defined here:
__init__(self, jDescriptor)
runScript(self)
Checkout head version of RTT. This will be shipped back to the
machine running RTT  Scripts, where Test Suite can be run as an
RTT test. Dont run TestSuite on the batch machine to avoid
requiring Python on that machine.

 
class RTTTrivialJobScriptWriter(ScriptWriter)
     Methods defined here:
__init__(self, jDescriptor)
runScript(self)
Checkout head version of RTT. This will be shipped back to the
machine running RTT  Scripts, where Test Suite can be run as an
RTT test. Dont run TestSuite on the batch machine to avoid
requiring Python on that machine.

 
class RecExCommonScriptWriter(AthenaScriptWriter)
    Script to run RecExCommon.
This needs to perform various RecExCommon tasks.
Also, for reading DC1 data, the ZEBRA .P link, which was set when the
run directories were setup, needs to be protected because the REC tasks
will overwrite it.
 
 
Method resolution order:
RecExCommonScriptWriter
AthenaScriptWriter
ScriptWriter

Methods defined here:
G3flag(self)
__init__(self, jDescriptor)
athenaCommand(self, release=830)
add in flags to run on DC1
commandLineFlags(self)
dataSet(self)
runScript(self)

Methods inherited from AthenaScriptWriter:
checkExtension(self, option)
commandLineOptionLabel(self)
jobOptionsFile(self)
Returns the path to the job options file that is to be
tacked on the end of the athena command.
--- If DC1 or dataless job: just return the job options passed in <options> tag
--- If DC2 or BS data: return an RTT created job options that 'includes' the
user one in the <options> tag but then adds the data in the <dataset> tag(s)
to the appropriate Python class (DC2 = EventSelector.InputCollections,
BS = ByteStreamEventStorageInputSvc.FullFileName).
jobOptionsListHandler(self)
lsatlF(self, when)
poolInsertString(self)

 
class RuleCheckerScriptWriter(ScriptWriter)
     Methods defined here:
__init__(self, jDescriptor)
runScript(self)
CMT stuff needed to run RuleChecker once a directory is checked out.
Empirically, I find gmake has to be run before gmake rulechecker,
I think because the include files need to be installed.
 
Temporarily (14/7/04) I also need to check out CodeCheck.
Hopefully this will be unecessary soon.

 
class ScriptWriter
     Methods defined here:
__init__(self, jDescriptor)
Common stuff for all Scriptwriters - use Descriptor base path

 
class TrigReleaseCaloScriptWriter(TrigReleaseIDScriptWriter)
    
Method resolution order:
TrigReleaseCaloScriptWriter
TrigReleaseIDScriptWriter
AthenaScriptWriter
ScriptWriter

Methods defined here:
__init__(self, jDescriptor)

Methods inherited from TrigReleaseIDScriptWriter:
dataSet(self)
runScript(self)

Methods inherited from AthenaScriptWriter:
athenaCommand(self, release=830)
Command for running athena. from about 8.2.0, packages started switching to
using python scripts to run athena.
checkExtension(self, option)
commandLineFlags(self)
commandLineOptionLabel(self)
jobOptionsFile(self)
Returns the path to the job options file that is to be
tacked on the end of the athena command.
--- If DC1 or dataless job: just return the job options passed in <options> tag
--- If DC2 or BS data: return an RTT created job options that 'includes' the
user one in the <options> tag but then adds the data in the <dataset> tag(s)
to the appropriate Python class (DC2 = EventSelector.InputCollections,
BS = ByteStreamEventStorageInputSvc.FullFileName).
jobOptionsListHandler(self)
lsatlF(self, when)
poolInsertString(self)

 
class TrigReleaseIDScriptWriter(AthenaScriptWriter)
    
Method resolution order:
TrigReleaseIDScriptWriter
AthenaScriptWriter
ScriptWriter

Methods defined here:
__init__(self, jDescriptor)
dataSet(self)
runScript(self)

Methods inherited from AthenaScriptWriter:
athenaCommand(self, release=830)
Command for running athena. from about 8.2.0, packages started switching to
using python scripts to run athena.
checkExtension(self, option)
commandLineFlags(self)
commandLineOptionLabel(self)
jobOptionsFile(self)
Returns the path to the job options file that is to be
tacked on the end of the athena command.
--- If DC1 or dataless job: just return the job options passed in <options> tag
--- If DC2 or BS data: return an RTT created job options that 'includes' the
user one in the <options> tag but then adds the data in the <dataset> tag(s)
to the appropriate Python class (DC2 = EventSelector.InputCollections,
BS = ByteStreamEventStorageInputSvc.FullFileName).
jobOptionsListHandler(self)
lsatlF(self, when)
poolInsertString(self)

 
class TriggerReleaseScriptWriter(AthenaScriptWriter)
    
Method resolution order:
TriggerReleaseScriptWriter
AthenaScriptWriter
ScriptWriter

Methods defined here:
__init__(self, jDescriptor)
dataSet(self)
runScript(self)

Methods inherited from AthenaScriptWriter:
athenaCommand(self, release=830)
Command for running athena. from about 8.2.0, packages started switching to
using python scripts to run athena.
checkExtension(self, option)
commandLineFlags(self)
commandLineOptionLabel(self)
jobOptionsFile(self)
Returns the path to the job options file that is to be
tacked on the end of the athena command.
--- If DC1 or dataless job: just return the job options passed in <options> tag
--- If DC2 or BS data: return an RTT created job options that 'includes' the
user one in the <options> tag but then adds the data in the <dataset> tag(s)
to the appropriate Python class (DC2 = EventSelector.InputCollections,
BS = ByteStreamEventStorageInputSvc.FullFileName).
jobOptionsListHandler(self)
lsatlF(self, when)
poolInsertString(self)

 
Functions
       
libLineCalculator(siteSpecifics, mode)
This function calculates the LD_LIBRARY_PATH line.
This line will be placed in a shell script that will be run using
Popen4.
 
The explicit value of LD_LIBRARY_PATH is written out so the file
can be run by hand under the same conditions that the p4open object
sees.
writeToDir(script)

 
Data
        logger = <logging.Logger instance>