CMS 3D CMS Logo

runall::testit Class Reference

List of all members.

Public Member Functions

def __init__
def run

Public Attributes

 command
 nfail
 npass
 report
 status


Detailed Description

Definition at line 8 of file runall.py.


Member Function Documentation

def runall::testit::__init__ (   self,
  command 
)

Definition at line 9 of file runall.py.

00009                               :
00010         Thread.__init__(self)
00011         self.command=command
00012         self.status=-1
00013         self.report=''
00014         self.nfail=0
00015         self.npass=0
    def run(self):

def runall::testit::run (   self  ) 

Definition at line 16 of file runall.py.

00016                  :
00017         commandbase=''
00018         for word in self.command.split(' ')[1:]:
00019             commandbase+='%s_'%word
00020         logfile='%s.log' %commandbase[:-1]
00021         logfile = logfile.replace('/','_') # otherwise the path in the args to --cusotmize make trouble
00022         
00023         startime='date %s' %time.asctime()
00024         executable='%s > %s 2>&1' %(self.command,logfile)
00025     
00026         exitcode=os.system(executable)
00027         endtime='date %s' %time.asctime()
00028         tottime='%s-%s'%(endtime,startime)
00029     
00030         if exitcode!=0:
00031             log='%s : FAILED - time: %s s - exit: %s\n' %(self.command,tottime,exitcode)
00032             self.report+='%s\n'%log
00033             self.nfail=1
00034             self.npass=0
00035         else:
00036             log='%s : PASSED - time: %s s - exit: %s\n' %(self.command,tottime,exitcode)
00037             self.report+='%s\n'%log
00038             self.nfail=0
00039             self.npass=1
00040                 
def main(argv) :


Member Data Documentation

runall::testit::command

Definition at line 11 of file runall.py.

runall::testit::nfail

Definition at line 14 of file runall.py.

runall::testit::npass

Definition at line 15 of file runall.py.

runall::testit::report

Definition at line 13 of file runall.py.

runall::testit::status

Definition at line 12 of file runall.py.


The documentation for this class was generated from the following file:
Generated on Tue Jun 9 18:52:32 2009 for CMSSW by  doxygen 1.5.4