aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMilo Casagrande <milo.casagrande@linaro.org>2015-02-02 16:15:06 +0100
committerMilo Casagrande <milo.casagrande@linaro.org>2015-02-02 16:15:06 +0100
commitb0bdc3e77e7f14ef03708ca5e8a4ec84333672b6 (patch)
treed67b98f58ea3e43d9bc9f0273dd4dc536986ad85
parented2bd4a4f495d9d29c835ae150981c8f344b77ce (diff)
Add missing fields to bisect model.
Change-Id: I32ecb62374978088d352691eac44ff65dc509839
-rw-r--r--app/models/bisect.py18
-rw-r--r--app/models/tests/test_bisect_model.py5
2 files changed, 16 insertions, 7 deletions
diff --git a/app/models/bisect.py b/app/models/bisect.py
index 7e2af85..8aa58c3 100644
--- a/app/models/bisect.py
+++ b/app/models/bisect.py
@@ -129,16 +129,22 @@ class BootBisectDocument(BisectDocument):
def __init__(self, name):
super(BootBisectDocument, self).__init__(name)
+ self.arch = None
self.board = None
- self.defconfig_id = None
self.boot_id = None
+ self.defconfig = None
+ self.defconfig_full = None
+ self.defconfig_id = None
self.type = "boot"
def to_dict(self):
boot_b_dict = super(BootBisectDocument, self).to_dict()
+ boot_b_dict[models.ARCHITECTURE_KEY] = self.arch
boot_b_dict[models.BOARD_KEY] = self.board
- boot_b_dict[models.DEFCONFIG_ID_KEY] = self.defconfig_id
boot_b_dict[models.BOOT_ID_KEY] = self.boot_id
+ boot_b_dict[models.DEFCONFIG_FULL_KEY] = self.defconfig_full
+ boot_b_dict[models.DEFCONFIG_ID_KEY] = self.defconfig_id
+ boot_b_dict[models.DEFCONFIG_KEY] = self.defconfig
return boot_b_dict
@@ -148,17 +154,17 @@ class DefconfigBisectDocument(BisectDocument):
def __init__(self, name):
super(DefconfigBisectDocument, self).__init__(name)
+ self.arch = None
self.defconfig = None
- self.defconfig_id = None
self.defconfig_full = None
- self.arch = None
+ self.defconfig_id = None
self.type = "build"
def to_dict(self):
def_b_dict = super(DefconfigBisectDocument, self).to_dict()
+ def_b_dict[models.ARCHITECTURE_KEY] = self.arch
+ def_b_dict[models.DEFCONFIG_FULL_KEY] = self.defconfig_full
def_b_dict[models.DEFCONFIG_ID_KEY] = self.defconfig_id
def_b_dict[models.DEFCONFIG_KEY] = self.defconfig
- def_b_dict[models.DEFCONFIG_FULL_KEY] = self.defconfig_full
- def_b_dict[models.ARCHITECTURE_KEY] = self.arch
return def_b_dict
diff --git a/app/models/tests/test_bisect_model.py b/app/models/tests/test_bisect_model.py
index d968140..6d395f7 100644
--- a/app/models/tests/test_bisect_model.py
+++ b/app/models/tests/test_bisect_model.py
@@ -107,7 +107,10 @@ class TestBisectModel(unittest.TestCase):
"boot_id": "boot-id",
"defconfig_id": "defconfig-id",
"job_id": "job-id",
- "type": "boot"
+ "type": "boot",
+ "arch": None,
+ "defconfig": None,
+ "defconfig_full": None
}
self.assertDictEqual(expected, bisect_doc.to_dict())