diff options
Diffstat (limited to 'meta/lib/oeqa/selftest/cases/distrodata.py')
-rw-r--r-- | meta/lib/oeqa/selftest/cases/distrodata.py | 35 |
1 files changed, 23 insertions, 12 deletions
diff --git a/meta/lib/oeqa/selftest/cases/distrodata.py b/meta/lib/oeqa/selftest/cases/distrodata.py index e1cfc3b621..f2c6124d70 100644 --- a/meta/lib/oeqa/selftest/cases/distrodata.py +++ b/meta/lib/oeqa/selftest/cases/distrodata.py | |||
@@ -1,11 +1,10 @@ | |||
1 | # | 1 | # |
2 | # Copyright OpenEmbedded Contributors | ||
3 | # | ||
2 | # SPDX-License-Identifier: MIT | 4 | # SPDX-License-Identifier: MIT |
3 | # | 5 | # |
4 | 6 | ||
5 | from oeqa.selftest.case import OESelftestTestCase | 7 | from oeqa.selftest.case import OESelftestTestCase |
6 | from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_bb_vars | ||
7 | from oeqa.utils.decorators import testcase | ||
8 | from oeqa.utils.ftools import write_file | ||
9 | 8 | ||
10 | import oe.recipeutils | 9 | import oe.recipeutils |
11 | 10 | ||
@@ -18,13 +17,13 @@ class Distrodata(OESelftestTestCase): | |||
18 | Product: oe-core | 17 | Product: oe-core |
19 | Author: Alexander Kanavin <alex.kanavin@gmail.com> | 18 | Author: Alexander Kanavin <alex.kanavin@gmail.com> |
20 | """ | 19 | """ |
21 | feature = 'LICENSE_FLAGS_WHITELIST += " commercial"\n' | 20 | feature = 'LICENSE_FLAGS_ACCEPTED += " commercial"\n' |
22 | self.write_config(feature) | 21 | self.write_config(feature) |
23 | 22 | ||
24 | pkgs = oe.recipeutils.get_recipe_upgrade_status() | 23 | pkggroups = oe.recipeutils.get_recipe_upgrade_status() |
25 | 24 | ||
26 | regressed_failures = [pkg[0] for pkg in pkgs if pkg[1] == 'UNKNOWN_BROKEN'] | 25 | regressed_failures = [pkg['pn'] for pkgs in pkggroups for pkg in pkgs if pkg['status'] == 'UNKNOWN_BROKEN'] |
27 | regressed_successes = [pkg[0] for pkg in pkgs if pkg[1] == 'KNOWN_BROKEN'] | 26 | regressed_successes = [pkg['pn'] for pkgs in pkggroups for pkg in pkgs if pkg['status'] == 'KNOWN_BROKEN'] |
28 | msg = "" | 27 | msg = "" |
29 | if len(regressed_failures) > 0: | 28 | if len(regressed_failures) > 0: |
30 | msg = msg + """ | 29 | msg = msg + """ |
@@ -49,21 +48,21 @@ but their recipes claim otherwise by setting UPSTREAM_VERSION_UNKNOWN. Please re | |||
49 | Author: Alexander Kanavin <alex.kanavin@gmail.com> | 48 | Author: Alexander Kanavin <alex.kanavin@gmail.com> |
50 | """ | 49 | """ |
51 | def is_exception(pkg): | 50 | def is_exception(pkg): |
52 | exceptions = ["packagegroup-", "initramfs-", "systemd-machine-units", "target-sdk-provides-dummy"] | 51 | exceptions = ["packagegroup-",] |
53 | for i in exceptions: | 52 | for i in exceptions: |
54 | if i in pkg: | 53 | if i in pkg: |
55 | return True | 54 | return True |
56 | return False | 55 | return False |
57 | 56 | ||
58 | def is_maintainer_exception(entry): | 57 | def is_maintainer_exception(entry): |
59 | exceptions = ["musl", "newlib", "linux-yocto", "linux-dummy", "mesa-gl", "libgfortran", | 58 | exceptions = ["musl", "newlib", "picolibc", "linux-yocto", "linux-dummy", "mesa-gl", "libgfortran", "libx11-compose-data", |
60 | "cve-update-db-native"] | 59 | "cve-update-nvd2-native", "barebox", "libglvnd"] |
61 | for i in exceptions: | 60 | for i in exceptions: |
62 | if i in entry: | 61 | if i in entry: |
63 | return True | 62 | return True |
64 | return False | 63 | return False |
65 | 64 | ||
66 | feature = 'require conf/distro/include/maintainers.inc\nLICENSE_FLAGS_WHITELIST += " commercial"\nPARSE_ALL_RECIPES = "1"\n' | 65 | feature = 'require conf/distro/include/maintainers.inc\nLICENSE_FLAGS_ACCEPTED += " commercial"\nPARSE_ALL_RECIPES = "1"\nPACKAGE_CLASSES = "package_ipk package_deb package_rpm"\n' |
67 | self.write_config(feature) | 66 | self.write_config(feature) |
68 | 67 | ||
69 | with bb.tinfoil.Tinfoil() as tinfoil: | 68 | with bb.tinfoil.Tinfoil() as tinfoil: |
@@ -74,7 +73,7 @@ but their recipes claim otherwise by setting UPSTREAM_VERSION_UNKNOWN. Please re | |||
74 | 73 | ||
75 | missing_recipes = [] | 74 | missing_recipes = [] |
76 | recipes = [] | 75 | recipes = [] |
77 | prefix = "RECIPE_MAINTAINER_pn-" | 76 | prefix = "RECIPE_MAINTAINER:pn-" |
78 | 77 | ||
79 | # We could have used all_recipes() here, but this method will find | 78 | # We could have used all_recipes() here, but this method will find |
80 | # every recipe if we ever move to setting RECIPE_MAINTAINER in recipe files | 79 | # every recipe if we ever move to setting RECIPE_MAINTAINER in recipe files |
@@ -116,3 +115,15 @@ The list of oe-core recipes with maintainers is empty. This may indicate that th | |||
116 | self.fail(""" | 115 | self.fail(""" |
117 | Unable to find recipes for the following entries in maintainers.inc: | 116 | Unable to find recipes for the following entries in maintainers.inc: |
118 | """ + "\n".join(['%s' % i for i in missing_recipes])) | 117 | """ + "\n".join(['%s' % i for i in missing_recipes])) |
118 | |||
119 | def test_common_include_recipes(self): | ||
120 | """ | ||
121 | Summary: Test that obtaining recipes that share includes between them returns a sane result | ||
122 | Expected: At least cmake and qemu entries are present in the output | ||
123 | Product: oe-core | ||
124 | Author: Alexander Kanavin <alex.kanavin@gmail.com> | ||
125 | """ | ||
126 | recipes = oe.recipeutils.get_common_include_recipes() | ||
127 | |||
128 | self.assertIn({'qemu-system-native', 'qemu', 'qemu-native'}, recipes) | ||
129 | self.assertIn({'cmake-native', 'cmake'}, recipes) | ||