[yocto] [[PATCH][error-report-web] 5/8] Post/models.py: Build model add support for Error type.
Aníbal Limón
anibal.limon at linux.intel.com
Mon Jun 13 16:32:13 PDT 2016
In order to support other errors not only Recipe ones adds
a ERROR_TYPE field to the Build model defaults to "Recipe".
Add a class for store BuildErrorType currently supported
Recipe, Core, Bitbake selftest and OE selftest.
[YOCTO #7583]
Signed-off-by: Aníbal Limón <anibal.limon at linux.intel.com>
---
Post/migrations/0005_build_error_type.py | 19 +++++++++++++++++++
Post/models.py | 7 +++++++
2 files changed, 26 insertions(+)
create mode 100644 Post/migrations/0005_build_error_type.py
diff --git a/Post/migrations/0005_build_error_type.py b/Post/migrations/0005_build_error_type.py
new file mode 100644
index 0000000..96cdf8c
--- /dev/null
+++ b/Post/migrations/0005_build_error_type.py
@@ -0,0 +1,19 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('Post', '0004_auto_20160530_1126'),
+ ]
+
+ operations = [
+ migrations.AddField(
+ model_name='build',
+ name='ERROR_TYPE',
+ field=models.CharField(default=b'Recipe', max_length=64),
+ ),
+ ]
diff --git a/Post/models.py b/Post/models.py
index 84f8abf..f8d9916 100644
--- a/Post/models.py
+++ b/Post/models.py
@@ -11,6 +11,12 @@ from datetime import datetime
import Levenshtein
+class BuildErrorType(object):
+ RECIPE = "Recipe"
+ BITBAKE_CORE = "Core"
+ BITBAKE_SELFTEST = "Bitbake selftest"
+ OE_SELFTEST = "OE selftest"
+
# Create your models here.
class Build(models.Model):
DATE = models.DateTimeField('Submit date', blank=True, null=True)
@@ -25,6 +31,7 @@ class Build(models.Model):
NAME = models.CharField(max_length=50)
EMAIL = models.CharField(max_length=50)
LINK_BACK = models.TextField(max_length=300, blank=True, null=True)
+ ERROR_TYPE = models.CharField(max_length=64, default=BuildErrorType.RECIPE)
class BuildFailure(models.Model):
TASK = models.CharField(max_length=1024)
--
2.1.4
More information about the yocto
mailing list