diff options
Diffstat (limited to 'meta')
| -rw-r--r-- | meta/lib/oe/recipeutils.py | 23 | ||||
| -rw-r--r-- | meta/lib/oeqa/selftest/cases/distrodata.py | 6 |
2 files changed, 25 insertions, 4 deletions
diff --git a/meta/lib/oe/recipeutils.py b/meta/lib/oe/recipeutils.py index 7586332fe0..56be75dc9c 100644 --- a/meta/lib/oe/recipeutils.py +++ b/meta/lib/oe/recipeutils.py | |||
| @@ -1154,6 +1154,7 @@ def get_recipe_upgrade_status(recipes=None): | |||
| 1154 | if not recipes: | 1154 | if not recipes: |
| 1155 | recipes = tinfoil.all_recipe_files(variants=False) | 1155 | recipes = tinfoil.all_recipe_files(variants=False) |
| 1156 | 1156 | ||
| 1157 | recipeincludes = {} | ||
| 1157 | for fn in recipes: | 1158 | for fn in recipes: |
| 1158 | try: | 1159 | try: |
| 1159 | if fn.startswith("/"): | 1160 | if fn.startswith("/"): |
| @@ -1178,11 +1179,13 @@ def get_recipe_upgrade_status(recipes=None): | |||
| 1178 | 1179 | ||
| 1179 | data_copy_list.append(data_copy) | 1180 | data_copy_list.append(data_copy) |
| 1180 | 1181 | ||
| 1182 | recipeincludes[data.getVar('FILE')] = {'bbincluded':data.getVar('BBINCLUDED').split(),'pn':data.getVar('PN')} | ||
| 1183 | |||
| 1181 | from concurrent.futures import ProcessPoolExecutor | 1184 | from concurrent.futures import ProcessPoolExecutor |
| 1182 | with ProcessPoolExecutor(max_workers=utils.cpu_count()) as executor: | 1185 | with ProcessPoolExecutor(max_workers=utils.cpu_count()) as executor: |
| 1183 | pkgs_list = executor.map(_get_recipe_upgrade_status, data_copy_list) | 1186 | pkgs_list = executor.map(_get_recipe_upgrade_status, data_copy_list) |
| 1184 | 1187 | ||
| 1185 | return pkgs_list | 1188 | return _group_recipes(pkgs_list, _get_common_include_recipes(recipeincludes)) |
| 1186 | 1189 | ||
| 1187 | def get_common_include_recipes(): | 1190 | def get_common_include_recipes(): |
| 1188 | with bb.tinfoil.Tinfoil() as tinfoil: | 1191 | with bb.tinfoil.Tinfoil() as tinfoil: |
| @@ -1220,3 +1223,21 @@ def _get_common_include_recipes(recipeincludes_all): | |||
| 1220 | recipes_with_shared_includes.append(recipeset) | 1223 | recipes_with_shared_includes.append(recipeset) |
| 1221 | 1224 | ||
| 1222 | return recipes_with_shared_includes | 1225 | return recipes_with_shared_includes |
| 1226 | |||
| 1227 | def _group_recipes(recipes, groups): | ||
| 1228 | recipedict = {} | ||
| 1229 | for r in recipes: | ||
| 1230 | recipedict[r['pn']] = r | ||
| 1231 | |||
| 1232 | recipegroups = [] | ||
| 1233 | for g in groups: | ||
| 1234 | recipeset = [] | ||
| 1235 | for r in g: | ||
| 1236 | if r in recipedict.keys(): | ||
| 1237 | recipeset.append(recipedict[r]) | ||
| 1238 | del recipedict[r] | ||
| 1239 | recipegroups.append(recipeset) | ||
| 1240 | |||
| 1241 | for r in recipedict.values(): | ||
| 1242 | recipegroups.append([r]) | ||
| 1243 | return recipegroups | ||
diff --git a/meta/lib/oeqa/selftest/cases/distrodata.py b/meta/lib/oeqa/selftest/cases/distrodata.py index bc56160522..bd37552364 100644 --- a/meta/lib/oeqa/selftest/cases/distrodata.py +++ b/meta/lib/oeqa/selftest/cases/distrodata.py | |||
| @@ -20,10 +20,10 @@ class Distrodata(OESelftestTestCase): | |||
| 20 | feature = 'LICENSE_FLAGS_ACCEPTED += " commercial"\n' | 20 | feature = 'LICENSE_FLAGS_ACCEPTED += " commercial"\n' |
| 21 | self.write_config(feature) | 21 | self.write_config(feature) |
| 22 | 22 | ||
| 23 | pkgs = oe.recipeutils.get_recipe_upgrade_status() | 23 | pkggroups = oe.recipeutils.get_recipe_upgrade_status() |
| 24 | 24 | ||
| 25 | regressed_failures = [pkg['pn'] for pkg in pkgs if pkg['status'] == 'UNKNOWN_BROKEN'] | 25 | regressed_failures = [pkg['pn'] for pkgs in pkggroups for pkg in pkgs if pkg['status'] == 'UNKNOWN_BROKEN'] |
| 26 | regressed_successes = [pkg['pn'] for pkg in pkgs if pkg['status'] == 'KNOWN_BROKEN'] | 26 | regressed_successes = [pkg['pn'] for pkgs in pkggroups for pkg in pkgs if pkg['status'] == 'KNOWN_BROKEN'] |
| 27 | msg = "" | 27 | msg = "" |
| 28 | if len(regressed_failures) > 0: | 28 | if len(regressed_failures) > 0: |
| 29 | msg = msg + """ | 29 | msg = msg + """ |
