Definition at line 65 of file addOnTests.py.
def addOnTests.StandardTester.__init__ |
( |
|
self, |
|
|
|
nThrMax = 4 |
|
) |
| |
def addOnTests.StandardTester.activeThreads |
( |
|
self | ) |
|
def addOnTests.StandardTester.dumpTest |
( |
|
self | ) |
|
Definition at line 123 of file addOnTests.py.
References join(), and edm.print().
S & print(S &os, JobReport::InputFile const &f)
static std::string join(char **cmd)
def addOnTests.StandardTester.file2Path |
( |
|
self, |
|
|
|
rFile |
|
) |
| |
def addOnTests.StandardTester.prepare |
( |
|
self | ) |
|
Definition at line 83 of file addOnTests.py.
85 self.
devPath = os.environ[
'LOCALRT'] +
'/src/' 87 if 'CMSSW_RELEASE_BASE' in os.environ
and (os.environ[
'CMSSW_RELEASE_BASE'] !=
""): self.
relPath = os.environ[
'CMSSW_RELEASE_BASE'] +
'/src/' 89 lines = {
'read312RV' : [
'cmsRun '+self.
file2Path(
'Utilities/ReleaseScripts/scripts/read312RV_cfg.py')],
90 'fastsim' : [
"cmsDriver.py TTbar_8TeV_TuneCUETP8M1_cfi --conditions auto:run1_mc --fast -n 100 --eventcontent AODSIM,DQM --relval 100000,1000 -s GEN,SIM,RECOBEFMIX,DIGI:pdigi_valid,L1,DIGI2RAW,L1Reco,RECO,EI,VALIDATION --customise=HLTrigger/Configuration/CustomConfigs.L1THLT --datatier GEN-SIM-DIGI-RECO,DQMIO --beamspot Realistic8TeVCollision"],
91 'fastsim1' : [
"cmsDriver.py TTbar_13TeV_TuneCUETP8M1_cfi --conditions auto:run2_mc_l1stage1 --fast -n 100 --eventcontent AODSIM,DQM --relval 100000,1000 -s GEN,SIM,RECOBEFMIX,DIGI:pdigi_valid,L1,DIGI2RAW,L1Reco,RECO,EI,VALIDATION --customise=HLTrigger/Configuration/CustomConfigs.L1THLT --datatier GEN-SIM-DIGI-RECO,DQMIO --beamspot NominalCollision2015 --era Run2_25ns"],
92 'fastsim2' : [
"cmsDriver.py TTbar_13TeV_TuneCUETP8M1_cfi --conditions auto:run2_mc --fast -n 100 --eventcontent AODSIM,DQM --relval 100000,1000 -s GEN,SIM,RECOBEFMIX,DIGI:pdigi_valid,L1,DIGI2RAW,L1Reco,RECO,EI,VALIDATION --customise=HLTrigger/Configuration/CustomConfigs.L1THLT --datatier GEN-SIM-DIGI-RECO,DQMIO --beamspot NominalCollision2015 --era Run2_2016"],
93 'pat1' : [
'cmsRun '+self.
file2Path(
'PhysicsTools/PatAlgos/test/IntegrationTest_cfg.py')],
97 hltFlag_data =
' realData=True globalTag=@ inputFiles=@ ' 98 hltFlag_mc =
' realData=False globalTag=@ inputFiles=@ ' 99 from Configuration.HLT.addOnTestsHLT
import addOnTestsHLT
101 for key
in hltTestsToAdd:
103 hltTests[key] = [hltTestsToAdd[key][0],
104 'cmsRun '+self.
file2Path(hltTestsToAdd[key][1])+hltFlag_data,
105 hltTestsToAdd[key][2]]
107 hltTests[key] = [hltTestsToAdd[key][0],
108 'cmsRun '+self.
file2Path(hltTestsToAdd[key][1])+hltFlag_mc,
109 hltTestsToAdd[key][2]]
111 hltTests[key] = [hltTestsToAdd[key][0],
112 'cmsRun '+self.
file2Path(hltTestsToAdd[key][1]),
113 hltTestsToAdd[key][2]]
116 for dirName, command
in lines.items():
119 for dirName, commandList
in hltTests.items():
120 self.
commands[dirName] = commandList
def file2Path(self, rFile)
def addOnTests.StandardTester.runTests |
( |
|
self, |
|
|
|
testList = None |
|
) |
| |
Definition at line 133 of file addOnTests.py.
References MatrixRunner.MatrixRunner.activeThreads(), addOnTests.StandardTester.activeThreads(), addOnTests.StandardTester.commands, MatrixRunner.MatrixRunner.maxThreads, addOnTests.StandardTester.maxThreads, edm.print(), str, MatrixRunner.MatrixRunner.threadList, and addOnTests.StandardTester.threadList.
137 if not os.path.exists(
'addOnTests'):
138 os.makedirs(
'addOnTests')
139 os.chdir(
'addOnTests')
147 for dirName, command
in self.commands.items():
149 if testList
and not dirName
in testList:
158 print(
'Preparing to run %s' %
str(command))
159 current =
testit(dirName, command)
160 self.threadList.append(current)
162 time.sleep(random.randint(1,5))
171 for f
in pingle.nfail: nfail += f
172 for p
in pingle.npass: npass += p
173 report += pingle.report
177 reportSumm =
'\n %s tests passed, %s failed \n' %(npass,nfail)
180 runall_report_name=
'runall-report.log' 181 runall_report=open(runall_report_name,
'w')
182 runall_report.write(report+reportSumm)
183 runall_report.close()
186 print(
'==> in :', os.getcwd())
187 print(
' going to copy log files to logs dir ...')
188 if not os.path.exists(
'logs'):
191 cmd =
"for L in `ls "+dirName+
"/*.log`; do cp $L logs/cmsDriver-`dirname $L`_`basename $L` ; done" 192 print(
"going to ",cmd)
196 pickle.dump(self.
commands, open(
'logs/addOnTests.pkl',
'w') )
S & print(S &os, JobReport::InputFile const &f)
def runTests(self, testList=None)
def addOnTests.StandardTester.upload |
( |
|
self, |
|
|
|
tgtDir |
|
) |
| |
Definition at line 202 of file addOnTests.py.
References edm.print(), and str.
204 print(
"in ", os.getcwd())
206 if not os.path.exists(tgtDir):
209 cmd =
'tar cf - addOnTests.log addOnTests/logs | (cd '+tgtDir+
' ; tar xf - ) ' 211 print(
'executing: ',cmd)
214 print(
"ERROR uploading logs:", ret, cmd)
215 except Exception
as e:
216 print(
"EXCEPTION while uploading addOnTest-logs : ",
str(e))
S & print(S &os, JobReport::InputFile const &f)
addOnTests.StandardTester.commands |
addOnTests.StandardTester.devPath |
addOnTests.StandardTester.maxThreads |
addOnTests.StandardTester.relPath |
addOnTests.StandardTester.threadList |