diff options
Diffstat (limited to 'meta/lib/oeqa/selftest/cases/distrodata.py')
-rw-r--r-- | meta/lib/oeqa/selftest/cases/distrodata.py | 53 |
1 files changed, 8 insertions, 45 deletions
diff --git a/meta/lib/oeqa/selftest/cases/distrodata.py b/meta/lib/oeqa/selftest/cases/distrodata.py index fbc0c2a98d..ad952c004b 100644 --- a/meta/lib/oeqa/selftest/cases/distrodata.py +++ b/meta/lib/oeqa/selftest/cases/distrodata.py @@ -1,11 +1,10 @@ # +# Copyright OpenEmbedded Contributors +# # SPDX-License-Identifier: MIT # from oeqa.selftest.case import OESelftestTestCase -from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_bb_vars -from oeqa.utils.decorators import testcase -from oeqa.utils.ftools import write_file import oe.recipeutils @@ -18,7 +17,7 @@ class Distrodata(OESelftestTestCase): Product: oe-core Author: Alexander Kanavin <alex.kanavin@gmail.com> """ - feature = 'LICENSE_FLAGS_WHITELIST += " commercial"\n' + feature = 'LICENSE_FLAGS_ACCEPTED += " commercial"\n' self.write_config(feature) pkgs = oe.recipeutils.get_recipe_upgrade_status() @@ -40,42 +39,6 @@ but their recipes claim otherwise by setting UPSTREAM_VERSION_UNKNOWN. Please re """ + "\n".join(regressed_successes) self.assertTrue(len(regressed_failures) == 0 and len(regressed_successes) == 0, msg) - def test_missing_homepg(self): - """ - Summary: Test for oe-core recipes that don't have a HOMEPAGE or DESCRIPTION - Expected: All oe-core recipes should have a DESCRIPTION entry - Expected: All oe-core recipes should have a HOMEPAGE entry except for recipes that are not fetched from external sources. - Product: oe-core - """ - with bb.tinfoil.Tinfoil() as tinfoil: - tinfoil.prepare(config_only=False) - no_description = [] - no_homepage = [] - for fn in tinfoil.all_recipe_files(variants=False): - if not '/meta/recipes-' in fn: - # We are only interested in OE-Core - continue - rd = tinfoil.parse_recipe_file(fn, appends=False) - pn = rd.getVar('BPN') - srcfile = rd.getVar('SRC_URI').split() - #Since DESCRIPTION defaults to SUMMARY if not set, we are only interested in recipes without DESCRIPTION or SUMMARY - if not (rd.getVar('SUMMARY') or rd.getVar('DESCRIPTION')): - no_description.append((pn, fn)) - if not rd.getVar('HOMEPAGE'): - if srcfile and srcfile[0].startswith('file') or not rd.getVar('SRC_URI'): - # We are only interested in recipes SRC_URI fetched from external sources - continue - no_homepage.append((pn, fn)) - if no_homepage: - self.fail(""" -The following recipes do not have a HOMEPAGE. Please add an entry for HOMEPAGE in the recipe. -""" + "\n".join(['%s (%s)' % i for i in no_homepage])) - - if no_description: - self.fail(""" -The following recipes do not have a DESCRIPTION. Please add an entry for DESCRIPTION in the recipe. -""" + "\n".join(['%s (%s)' % i for i in no_description])) - def test_maintainers(self): """ Summary: Test that oe-core recipes have a maintainer and entries in maintainers list have a recipe @@ -85,21 +48,21 @@ The following recipes do not have a DESCRIPTION. Please add an entry for DESCRIP Author: Alexander Kanavin <alex.kanavin@gmail.com> """ def is_exception(pkg): - exceptions = ["packagegroup-", "initramfs-", "systemd-machine-units", "target-sdk-provides-dummy"] + exceptions = ["packagegroup-",] for i in exceptions: if i in pkg: return True return False def is_maintainer_exception(entry): - exceptions = ["musl", "newlib", "linux-yocto", "linux-dummy", "mesa-gl", "libgfortran", - "cve-update-db-native"] + exceptions = ["musl", "newlib", "linux-yocto", "linux-dummy", "mesa-gl", "libgfortran", "libx11-compose-data", + "cve-update-nvd2-native",] for i in exceptions: if i in entry: return True return False - feature = 'require conf/distro/include/maintainers.inc\nLICENSE_FLAGS_WHITELIST += " commercial"\nPARSE_ALL_RECIPES = "1"\n' + feature = 'require conf/distro/include/maintainers.inc\nLICENSE_FLAGS_ACCEPTED += " commercial"\nPARSE_ALL_RECIPES = "1"\nPACKAGE_CLASSES = "package_ipk package_deb package_rpm"\n' self.write_config(feature) with bb.tinfoil.Tinfoil() as tinfoil: @@ -110,7 +73,7 @@ The following recipes do not have a DESCRIPTION. Please add an entry for DESCRIP missing_recipes = [] recipes = [] - prefix = "RECIPE_MAINTAINER_pn-" + prefix = "RECIPE_MAINTAINER:pn-" # We could have used all_recipes() here, but this method will find # every recipe if we ever move to setting RECIPE_MAINTAINER in recipe files |