Commit 14947dbc authored by Iustin Pop's avatar Iustin Pop
Browse files

Switch burnin to cli.JobExecutor

Burnin has a custom job executor, because of its need to retry some job

While we cannot replace all of it, at least the execution we can switch
to cli.JobExecutor, to take advantage of the recently-introduced
out-of-order waiting.
Signed-off-by: default avatarIustin Pop <>
Reviewed-by: default avatarGuido Trotter <>
parent 919ca415
......@@ -385,18 +385,19 @@ class Burner(object):
job_ids = [cli.SendJob(row[0], for row in jobs]
Log("Submitted job ID(s) %s", utils.CommaJoin(job_ids), indent=1)
results = []
for jid, (_, iname) in zip(job_ids, jobs):
Log("waiting for job %s for %s", jid, iname, indent=2)
jex = cli.JobExecutor(, feedback_fn=self.Feedback)
for ops, name in jobs:
jex.QueueJob(name, *ops) # pylint: disable-msg=W0142
results.append(cli.PollJob(jid,, feedback_fn=self.Feedback))
results = jex.GetResults()
except Exception, err: # pylint: disable-msg=W0703
Log("Job for %s failed: %s", iname, err)
if len(results) != len(jobs):
Log("Jobs failed: %s", err)
raise BurninFailure()
return results
if utils.any(results, lambda x: not x[0]):
raise BurninFailure()
return [i[1] for i in results]
def ParseOptions(self):
"""Parses the command line options.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment