CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
runall.testit Class Reference
Inheritance diagram for runall.testit:

Public Member Functions

def __init__ (self, command)
 
def run (self)
 

Public Attributes

 command
 
 nfail
 
 npass
 
 report
 
 status
 

Detailed Description

Definition at line 8 of file runall.py.

Constructor & Destructor Documentation

def runall.testit.__init__ (   self,
  command 
)

Definition at line 9 of file runall.py.

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

Member Function Documentation

def runall.testit.run (   self)

Definition at line 16 of file runall.py.

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

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

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

Member Data Documentation

runall.testit.command
runall.testit.nfail

Definition at line 14 of file runall.py.

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

runall.testit.npass

Definition at line 15 of file runall.py.

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

runall.testit.report
runall.testit.status