summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster
diff options
context:
space:
mode:
authorAlexandru DAMIAN <alexandru.damian@intel.com>2013-11-01 15:58:31 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-11-04 09:36:22 +0000
commit85b9194171a69fd7f161943f88df9c9f625cb4c7 (patch)
treebb4c12f2b7b218ab7ea56146c4fed452468e130d /bitbake/lib/toaster
parenta670859103dab0b28e52a4d91f476d2bccbc85ac (diff)
downloadpoky-85b9194171a69fd7f161943f88df9c9f625cb4c7.tar.gz
bitbake: build, toaster: record proper task type
Bitbake tasks may be of type 'python' or 'shell', or they may not be executed at all, which is record as task type 'noexec'. In order to record proper task type, this patch: * creates no exec task type as the default value in the toaster model definition * adds full task flags to the bb.build.TaskStarted event in build.py * if the task actually starts, the toaster ui will record the type of the task as either 'python' or 'shell' based on the task flags. [YOCTO #5073] [YOCTO #5075] [YOCTO #5327] (Bitbake rev: 6648c57e6d369fc009ea3a9fe939def5d2c67bf5) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster')
-rw-r--r--bitbake/lib/toaster/orm/models.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py
index cb6581c9e1..53b9e3a024 100644
--- a/bitbake/lib/toaster/orm/models.py
+++ b/bitbake/lib/toaster/orm/models.py
@@ -74,10 +74,12 @@ class Task(models.Model):
74 (SSTATE_RESTORED, 'Restored'), # succesfully restored 74 (SSTATE_RESTORED, 'Restored'), # succesfully restored
75 ) 75 )
76 76
77 CODING_PYTHON = 0 77 CODING_NOEXEC = 0
78 CODING_SHELL = 1 78 CODING_PYTHON = 1
79 CODING_SHELL = 2
79 80
80 TASK_CODING = ( 81 TASK_CODING = (
82 (CODING_NOEXEC, 'NoExec'),
81 (CODING_PYTHON, 'Python'), 83 (CODING_PYTHON, 'Python'),
82 (CODING_SHELL, 'Shell'), 84 (CODING_SHELL, 'Shell'),
83 ) 85 )
@@ -108,7 +110,7 @@ class Task(models.Model):
108 task_name = models.CharField(max_length=100) 110 task_name = models.CharField(max_length=100)
109 source_url = models.FilePathField(max_length=255, blank=True) 111 source_url = models.FilePathField(max_length=255, blank=True)
110 work_directory = models.FilePathField(max_length=255, blank=True) 112 work_directory = models.FilePathField(max_length=255, blank=True)
111 script_type = models.IntegerField(choices=TASK_CODING, default=CODING_PYTHON) 113 script_type = models.IntegerField(choices=TASK_CODING, default=CODING_NOEXEC)
112 line_number = models.IntegerField(default=0) 114 line_number = models.IntegerField(default=0)
113 disk_io = models.IntegerField(null=True) 115 disk_io = models.IntegerField(null=True)
114 cpu_usage = models.DecimalField(max_digits=6, decimal_places=2, null=True) 116 cpu_usage = models.DecimalField(max_digits=6, decimal_places=2, null=True)