[OE-core] [PATCH 8/9] oeqa/utils/commands: Added method - get_all_bbappends

Daniel Istrate daniel.alexandrux.istrate at intel.com
Fri Feb 26 14:40:50 UTC 2016


This method runs 'bitbake-layers show-appends' and
returns a dictionary {recipe: [bbappends], ..}

Signed-off-by: Daniel Istrate <daniel.alexandrux.istrate at intel.com>
---
 meta/lib/oeqa/utils/commands.py | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/meta/lib/oeqa/utils/commands.py b/meta/lib/oeqa/utils/commands.py
index 6ae09d2..8fdb80d 100644
--- a/meta/lib/oeqa/utils/commands.py
+++ b/meta/lib/oeqa/utils/commands.py
@@ -184,6 +184,28 @@ def get_tasks_for_recipe(recipe):
 
     return tasks
 
+def get_all_bbappends():
+    """ Get all bbappends (bitbake-layers show-appends)
+    :return:a dict with {recipe: [bbappends]}
+    """
+    ret_dict = {}
+    ret = runCmd('bitbake-layers show-appends')
+
+    for line in ret.output.splitlines():
+        bb = re.findall('^(\S+\.bb.*):', line)
+        bbappend = re.findall('^\s+(\S+\.bbappend)', line)
+        if bb:
+            key = bb[0]
+            value_list = []
+            continue
+        if bbappend:
+            value = bbappend[0]
+            value_list.append(value)
+            ret_dict[key] = value_list
+            continue
+
+    return ret_dict
+
 
 def create_temp_layer(templayerdir, templayername, priority=999, recipepathspec='recipes-*/*'):
     os.makedirs(os.path.join(templayerdir, 'conf'))
-- 
2.1.0




More information about the Openembedded-core mailing list