| Submitter | Dongxiao Xu |
|---|---|
| Date | Feb. 23, 2012, 1:47 p.m. |
| Message ID | <cec8b6e6c33582be660dd35c6050efc3f28e6baa.1330003017.git.dongxiao.xu@intel.com> |
| Download | mbox | patch |
| Permalink | /patch/21701/ |
| State | New |
| Headers | show |
Comments
On Thu, 2012-02-23 at 21:47 +0800, Dongxiao Xu wrote: > The current code prints a log when a setscene task starts, therefore > the progressbar in hob will not receive it. Use a sceneQueueTaskStarted > event instead. > > Signed-off-by: Shane Wang <shane.wang@intel.com> > Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com> > --- > lib/bb/runqueue.py | 10 ++++++++++ > 1 files changed, 10 insertions(+), 0 deletions(-) > > diff --git a/lib/bb/runqueue.py b/lib/bb/runqueue.py > index d1d9ad9..ef28415 100644 > --- a/lib/bb/runqueue.py > +++ b/lib/bb/runqueue.py > @@ -1653,6 +1653,9 @@ class RunQueueExecuteScenequeue(RunQueueExecute): > self.task_skip(task) > return True > > + startevent = sceneQueueTaskStarted(task, self.stats, self.rq) > + bb.event.fire(startevent, self.cfgData) > + > pid, pipein, pipeout = self.fork_off_task(fn, realtask, taskname) > > self.build_pids[pid] = task > @@ -1720,6 +1723,13 @@ class runQueueTaskStarted(runQueueEvent): > runQueueEvent.__init__(self, task, stats, rq) > self.noexec = noexec > > +class sceneQueueTaskStarted(runQueueTaskStarted): > + """ > + Event notifing a setscene task was started > + """ > + def __init__(self, task, stats, rq, noexec=False): > + runQueueTaskStarted.__init__(self, task, stats, rq, noexec) > + This one has me a little worried since it inherits runQueueTaskStarted and a UI might confuse this with real runQueueTaskStarted() events. Is there something else we can inherit here? Cheers, Richard
On Thu, 2012-02-23 at 22:51 +0000, Richard Purdie wrote: > On Thu, 2012-02-23 at 21:47 +0800, Dongxiao Xu wrote: > > The current code prints a log when a setscene task starts, therefore > > the progressbar in hob will not receive it. Use a sceneQueueTaskStarted > > event instead. > > > > Signed-off-by: Shane Wang <shane.wang@intel.com> > > Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com> > > --- > > lib/bb/runqueue.py | 10 ++++++++++ > > 1 files changed, 10 insertions(+), 0 deletions(-) > > > > diff --git a/lib/bb/runqueue.py b/lib/bb/runqueue.py > > index d1d9ad9..ef28415 100644 > > --- a/lib/bb/runqueue.py > > +++ b/lib/bb/runqueue.py > > @@ -1653,6 +1653,9 @@ class RunQueueExecuteScenequeue(RunQueueExecute): > > self.task_skip(task) > > return True > > > > + startevent = sceneQueueTaskStarted(task, self.stats, self.rq) > > + bb.event.fire(startevent, self.cfgData) > > + > > pid, pipein, pipeout = self.fork_off_task(fn, realtask, taskname) > > > > self.build_pids[pid] = task > > @@ -1720,6 +1723,13 @@ class runQueueTaskStarted(runQueueEvent): > > runQueueEvent.__init__(self, task, stats, rq) > > self.noexec = noexec > > > > +class sceneQueueTaskStarted(runQueueTaskStarted): > > + """ > > + Event notifing a setscene task was started > > + """ > > + def __init__(self, task, stats, rq, noexec=False): > > + runQueueTaskStarted.__init__(self, task, stats, rq, noexec) > > + > > This one has me a little worried since it inherits runQueueTaskStarted > and a UI might confuse this with real runQueueTaskStarted() events. Is > there something else we can inherit here? Hi Richard, Here we inherit runQueueTaskStarted event is because we saw the sceneQueueTaskFailed event inherits runQueueTaskFailed in existing code. What about change both of sceneQueueTaskxxx directly inherit runQueueEvent? Thanks, Dongxiao > > Cheers, > > Richard > >
On Fri, 2012-02-24 at 08:34 +0800, Xu, Dongxiao wrote: > On Thu, 2012-02-23 at 22:51 +0000, Richard Purdie wrote: > > On Thu, 2012-02-23 at 21:47 +0800, Dongxiao Xu wrote: > > > The current code prints a log when a setscene task starts, therefore > > > the progressbar in hob will not receive it. Use a sceneQueueTaskStarted > > > event instead. > > > > > > Signed-off-by: Shane Wang <shane.wang@intel.com> > > > Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com> > > > --- > > > lib/bb/runqueue.py | 10 ++++++++++ > > > 1 files changed, 10 insertions(+), 0 deletions(-) > > > > > > diff --git a/lib/bb/runqueue.py b/lib/bb/runqueue.py > > > index d1d9ad9..ef28415 100644 > > > --- a/lib/bb/runqueue.py > > > +++ b/lib/bb/runqueue.py > > > @@ -1653,6 +1653,9 @@ class RunQueueExecuteScenequeue(RunQueueExecute): > > > self.task_skip(task) > > > return True > > > > > > + startevent = sceneQueueTaskStarted(task, self.stats, self.rq) > > > + bb.event.fire(startevent, self.cfgData) > > > + > > > pid, pipein, pipeout = self.fork_off_task(fn, realtask, taskname) > > > > > > self.build_pids[pid] = task > > > @@ -1720,6 +1723,13 @@ class runQueueTaskStarted(runQueueEvent): > > > runQueueEvent.__init__(self, task, stats, rq) > > > self.noexec = noexec > > > > > > +class sceneQueueTaskStarted(runQueueTaskStarted): > > > + """ > > > + Event notifing a setscene task was started > > > + """ > > > + def __init__(self, task, stats, rq, noexec=False): > > > + runQueueTaskStarted.__init__(self, task, stats, rq, noexec) > > > + > > > > This one has me a little worried since it inherits runQueueTaskStarted > > and a UI might confuse this with real runQueueTaskStarted() events. Is > > there something else we can inherit here? > > Hi Richard, > > Here we inherit runQueueTaskStarted event is because we saw the > sceneQueueTaskFailed event inherits runQueueTaskFailed in existing code. > > What about change both of sceneQueueTaskxxx directly inherit > runQueueEvent? That sounds reasonable to me. sceneQueueTaskFailed sounds like a bug and might explain an error I keep seeing in knotty but haven't looked into/reported yet! You might fix a bug by changing that :) Cheers, Richard
Patch
diff --git a/lib/bb/runqueue.py b/lib/bb/runqueue.py index d1d9ad9..ef28415 100644 --- a/lib/bb/runqueue.py +++ b/lib/bb/runqueue.py @@ -1653,6 +1653,9 @@ class RunQueueExecuteScenequeue(RunQueueExecute): self.task_skip(task) return True + startevent = sceneQueueTaskStarted(task, self.stats, self.rq) + bb.event.fire(startevent, self.cfgData) + pid, pipein, pipeout = self.fork_off_task(fn, realtask, taskname) self.build_pids[pid] = task @@ -1720,6 +1723,13 @@ class runQueueTaskStarted(runQueueEvent): runQueueEvent.__init__(self, task, stats, rq) self.noexec = noexec +class sceneQueueTaskStarted(runQueueTaskStarted): + """ + Event notifing a setscene task was started + """ + def __init__(self, task, stats, rq, noexec=False): + runQueueTaskStarted.__init__(self, task, stats, rq, noexec) + class runQueueTaskFailed(runQueueEvent): """ Event notifing a task failed