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

◆ __init__()

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, dataset, job_number, job_id, job_name, isDA, isMC, applyBOWS, applyEXTRACOND, extraconditions, runboundary, lumilist, intlumi, maxevents, gt, allFromGT, alignmentDB, alignmentTAG, apeDB, apeTAG, bowDB, bowTAG, vertextype, tracktype, refittertype, ttrhtype, applyruncontrol, ptcut, CMSSW_dir, the_dir)

Member Function Documentation

◆ run()

def runall.testit.run (   self)

Definition at line 17 of file runall.py.

References runall.testit.command, runall.testit.nfail, TShapeAnalysis.npass, runall.testit.npass, runall.testit.report, ALIUtils.report, and submitPVValidationJobs.split().

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 

Member Data Documentation

◆ command

runall.testit.command

Definition at line 12 of file runall.py.

Referenced by runall.testit.run(), and cmsswPreprocessor.CmsswPreprocessor.run().

◆ nfail

runall.testit.nfail

◆ npass

runall.testit.npass

◆ report

runall.testit.report

◆ status

runall.testit.status