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 9 of file runall.py.

Constructor & Destructor Documentation

def runall.testit.__init__ (   self,
  command 
)

Definition at line 10 of file runall.py.

10  def __init__(self,command):
11  Thread.__init__(self)
12  self.command=command
13  self.status=-1
14  self.report=''
15  self.nfail=0
16  self.npass=0
def __init__(self, command)
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, runall.testit.npass, TShapeAnalysis.npass, runall.testit.report, and ALIUtils.report.

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

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

Member Data Documentation

runall.testit.command
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
runall.testit.status