5 from Configuration.PyReleaseValidation.WorkFlow
import WorkFlow
6 from Configuration.PyReleaseValidation.WorkFlowRunner
import WorkFlowRunner
12 def __init__(self, wfIn=None, nThrMax=4, nThreads=1):
27 if t.isAlive() : nActive += 1
38 startDir = os.getcwd()
43 print 'Not running the wf, only creating cfgs and logs'
44 print 'resetting to default number of threads'
47 print 'Running in %s thread(s)' % self.
maxThreads
52 if testList
and float(wf.numId)
not in [float(x)
for x
in testList]:
continue
55 if os.path.islink(item) :
continue
62 print '\nPreparing to run %s %s' % (wf.numId, item)
64 current =
WorkFlowRunner(wf,noRun,dryRun,cafVeto, opt.dasOptions, opt.jobReports, opt.nThreads)
65 self.threadList.append(current)
68 time.sleep(random.randint(1,5))
78 def count(collect,result):
80 for i
in range(len(collect),len(result)):
82 for i,c
in enumerate(result):
88 count(totpassed,pingle.npass)
89 count(totfailed,pingle.nfail)
91 self.
runDirs[pingle.wf.numId]=pingle.wfDir
93 msg =
"ERROR retrieving info from thread: " + str(e)
96 report+=
' '.
join(
map(str,totpassed))+
' tests passed, '+
' '.
join(
map(str,totfailed))+
' failed\n'
99 runall_report_name=
'runall-report-step123-.log'
100 runall_report=open(runall_report_name,
'w')
101 runall_report.write(report)
102 runall_report.close()
105 anyFail=sum(totfailed)
static std::string join(char **cmd)