summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandru DAMIAN <alexandru.damian@intel.com>2014-03-24 18:28:22 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-03-25 21:26:50 +0000
commit55f6a3508d8bf0f248fe28d9a53cfd855289bad4 (patch)
treead46f74541d097984715c17f7b58c028c86086d0
parentae79fa3412150e2eb876024a94681ef6cfe96e82 (diff)
downloadpoky-55f6a3508d8bf0f248fe28d9a53cfd855289bad4.tar.gz
toaster.bbclass: update buildstats event data
We add the PN to the buildstats event data in order to proper select database task when multiple similar tasks are executed for the same recipe file. (From OE-Core rev: 43d717df16312a8f0333aff6b8b037b4b9d51bf3) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/toaster.bbclass6
1 files changed, 3 insertions, 3 deletions
diff --git a/meta/classes/toaster.bbclass b/meta/classes/toaster.bbclass
index 563b1f7f7c..f55a4d7927 100644
--- a/meta/classes/toaster.bbclass
+++ b/meta/classes/toaster.bbclass
@@ -179,7 +179,7 @@ python toaster_collect_task_stats() {
179 bn = get_bn(e) 179 bn = get_bn(e)
180 bsdir = os.path.join(e.data.getVar('BUILDSTATS_BASE', True), bn) 180 bsdir = os.path.join(e.data.getVar('BUILDSTATS_BASE', True), bn)
181 taskdir = os.path.join(bsdir, e.data.expand("${PF}")) 181 taskdir = os.path.join(bsdir, e.data.expand("${PF}"))
182 fout.write("%s:%s:%s\n" % (e.taskfile, e.taskname, os.path.join(taskdir, e.task))) 182 fout.write("%s:%s:%s:%s\n" % (e.taskfile, e.taskname, os.path.join(taskdir, e.task), e.data.expand("${PN}")))
183 183
184 bb.utils.unlockfile(lock) 184 bb.utils.unlockfile(lock)
185 185
@@ -222,8 +222,8 @@ python toaster_collect_task_stats() {
222 events = [] 222 events = []
223 with open(os.path.join(e.data.getVar('BUILDSTATS_BASE', True), "toasterstatlist"), "r") as fin: 223 with open(os.path.join(e.data.getVar('BUILDSTATS_BASE', True), "toasterstatlist"), "r") as fin:
224 for line in fin: 224 for line in fin:
225 (taskfile, taskname, filename) = line.strip().split(":") 225 (taskfile, taskname, filename, recipename) = line.strip().split(":")
226 events.append((taskfile, taskname, _read_stats(filename))) 226 events.append((taskfile, taskname, _read_stats(filename), recipename))
227 bb.event.fire(bb.event.MetadataEvent("BuildStatsList", events), e.data) 227 bb.event.fire(bb.event.MetadataEvent("BuildStatsList", events), e.data)
228 os.unlink(os.path.join(e.data.getVar('BUILDSTATS_BASE', True), "toasterstatlist")) 228 os.unlink(os.path.join(e.data.getVar('BUILDSTATS_BASE', True), "toasterstatlist"))
229} 229}