CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Public Attributes
runall.testit Class Reference
Inheritance diagram for runall.testit:

Public Member Functions

def __init__
 
def run
 

Public Attributes

 command
 
 nfail
 
 npass
 
 report
 
 status
 

Detailed Description

Definition at line 9 of file runall.py.

Constructor & Destructor Documentation

def runall.testit.__init__ (   self,
  command 
)

Definition at line 10 of file runall.py.

10 
11  def __init__(self,command):
12  Thread.__init__(self)
13  self.command=command
14  self.status=-1
15  self.report=''
16  self.nfail=0
self.npass=0
def __init__
Definition: runall.py:10

Member Function Documentation

def runall.testit.run (   self)

Definition at line 17 of file runall.py.

References runall.testit.command, runall.testit.nfail, TShapeAnalysis.npass, runall.testit.npass, runall.testit.report, and ALIUtils.report.

Referenced by Types.EventID.cppID(), and Types.LuminosityBlockID.cppID().

17 
18  def run(self):
19  commandbase=''
20  for word in self.command.split(' ')[1:]:
21  commandbase+='%s_'%word
22  logfile='%s.log' %commandbase[:-1]
23  logfile = logfile.replace('/','_') # otherwise the path in the args to --cusotmize make trouble
24 
25  startime='date %s' %time.asctime()
26  executable='%s > %s 2>&1' %(self.command,logfile)
27 
28  exitcode=os.system(executable)
29  endtime='date %s' %time.asctime()
30  tottime='%s-%s'%(endtime,startime)
31 
32  if exitcode!=0:
33  log='%s : FAILED - time: %s s - exit: %s\n' %(self.command,tottime,exitcode)
34  self.report+='%s\n'%log
35  self.nfail=1
36  self.npass=0
37  else:
38  log='%s : PASSED - time: %s s - exit: %s\n' %(self.command,tottime,exitcode)
39  self.report+='%s\n'%log
40  self.nfail=0
41  self.npass=1

Member Data Documentation

runall.testit.command

Definition at line 12 of file runall.py.

Referenced by runall.testit.run(), and cmsswPreprocessor.CmsswPreprocessor.run().

runall.testit.nfail

Definition at line 15 of file runall.py.

Referenced by runall.testit.run(), and WorkFlowRunner.WorkFlowRunner.run().

runall.testit.npass

Definition at line 16 of file runall.py.

Referenced by runall.testit.run(), and WorkFlowRunner.WorkFlowRunner.run().

runall.testit.report

Definition at line 14 of file runall.py.

Referenced by dataset.Dataset.getPrimaryDatasetEntries(), runall.testit.run(), and addOnTests.testit.run().

runall.testit.status

Definition at line 13 of file runall.py.

Referenced by dirstructure.Comparison.__make_image(), and dirstructure.Comparison.__repr__().