CMS 3D CMS Logo

Public Member Functions | Public Attributes

runall::testit Class Reference

Inherits threading::Thread.

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.


Constructor & Destructor Documentation

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

Definition at line 9 of file runall.py.

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

Member Function Documentation

def runall::testit::run (   self)

Definition at line 16 of file runall.py.

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

Member Data Documentation

Definition at line 9 of file runall.py.

Definition at line 9 of file runall.py.

Definition at line 9 of file runall.py.

Definition at line 9 of file runall.py.

Definition at line 9 of file runall.py.