aboutsummaryrefslogtreecommitdiffstats
path: root/lib/toaster
diff options
context:
space:
mode:
authorAlexandru DAMIAN <alexandru.damian@intel.com>2013-11-14 10:52:58 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-11-15 11:25:37 +0000
commitec6cac74290f0d4f5b60222019c23416b4b8e1ef (patch)
treeb9b2397cba33c1eefc3bf3e208d4a429e1b2455f /lib/toaster
parente054c1e7c8581f66082fcdfb89769401ca6e78a3 (diff)
downloadbitbake-ec6cac74290f0d4f5b60222019c23416b4b8e1ef.tar.gz
toaster: fix tasks showing as NoExec
Tasks without script type information showed by default as NoExec; this happens for all Prebuild or Covered tasks, as script type information comes only on TaskStarted event. Such a default value may drive confusion, as NoExec value should be reserved for the NoExec-flagged tasks. This patch adds a new default value named Unknown that will be used for all tasks that don't have script type information available. [YOCTO #5327] Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/toaster')
-rw-r--r--lib/toaster/orm/models.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/toaster/orm/models.py b/lib/toaster/orm/models.py
index 53b9e3a02..f60d138fe 100644
--- a/lib/toaster/orm/models.py
+++ b/lib/toaster/orm/models.py
@@ -74,11 +74,13 @@ class Task(models.Model):
(SSTATE_RESTORED, 'Restored'), # succesfully restored
)
- CODING_NOEXEC = 0
- CODING_PYTHON = 1
- CODING_SHELL = 2
+ CODING_NA = 0
+ CODING_NOEXEC = 1
+ CODING_PYTHON = 2
+ CODING_SHELL = 3
TASK_CODING = (
+ (CODING_NA, 'N/A'),
(CODING_NOEXEC, 'NoExec'),
(CODING_PYTHON, 'Python'),
(CODING_SHELL, 'Shell'),
@@ -110,7 +112,7 @@ class Task(models.Model):
task_name = models.CharField(max_length=100)
source_url = models.FilePathField(max_length=255, blank=True)
work_directory = models.FilePathField(max_length=255, blank=True)
- script_type = models.IntegerField(choices=TASK_CODING, default=CODING_NOEXEC)
+ script_type = models.IntegerField(choices=TASK_CODING, default=CODING_NA)
line_number = models.IntegerField(default=0)
disk_io = models.IntegerField(null=True)
cpu_usage = models.DecimalField(max_digits=6, decimal_places=2, null=True)