Public Member Functions | |
def | __init__ |
def | run |
Public Attributes | |
command | |
nfail | |
npass | |
report | |
status |
Definition at line 8 of file runall.py.
def runall::testit::__init__ | ( | self, | ||
command | ||||
) |
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) :