[bitbake-devel] [PATCH 6/6] toaster: tests builds Add SSTATE_MISS as a valid condition for tc=833

Elliot Smith elliot.smith at intel.com
Thu May 19 12:59:33 UTC 2016


From: Michael Wood <michael.g.wood at intel.com>

Task.SSTATE_NA and Task.SSTATE_MISS are both valid conditions for the
condition that a Task.OUTCOME_COVERED and Task.OUTCOME_PREBUILT.

Signed-off-by: Michael Wood <michael.g.wood at intel.com>
Signed-off-by: Elliot Smith <elliot.smith at intel.com>
---
 bitbake/lib/toaster/tests/builds/test_core_image_min.py | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/bitbake/lib/toaster/tests/builds/test_core_image_min.py b/bitbake/lib/toaster/tests/builds/test_core_image_min.py
index 87d29c7..dec0bfa 100644
--- a/bitbake/lib/toaster/tests/builds/test_core_image_min.py
+++ b/bitbake/lib/toaster/tests/builds/test_core_image_min.py
@@ -115,12 +115,19 @@ class BuildCoreImageMinimal(BuildTest):
     # be 0 (SSTATE_NA) - tc=833
     def test_Task_If_Outcome_1_3_Sstate_Result_Must_Be_0(self):
         tasks = Task.objects.filter(
-            outcome__in=(1, 3)).values('id', 'sstate_result')
+            outcome__in=(Task.OUTCOME_COVERED,
+                         Task.OUTCOME_PREBUILT)).values('id',
+                                                        'task_name',
+                                                        'sstate_result')
         cnt_err = []
 
         for task in tasks:
-            if (task['sstate_result'] != 0):
-                cnt_err.append(task['id'])
+            if (task['sstate_result'] != Task.SSTATE_NA and
+                    task['sstate_result'] != Task.SSTATE_MISS):
+                cnt_err.append({'id': task['id'],
+                                'name': task['task_name'],
+                                'sstate_result': task['sstate_result'],
+                               })
 
         self.assertEqual(len(cnt_err),
                          0,
-- 
1.9.3

---------------------------------------------------------------------
Intel Corporation (UK) Limited
Registered No. 1134945 (England)
Registered Office: Pipers Way, Swindon SN3 1RJ
VAT No: 860 2173 47

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.




More information about the bitbake-devel mailing list