mirror of
https://git.yoctoproject.org/poky
synced 2026-04-18 12:32:12 +02:00
distrodata.py: Test to track recipes without HOMEPAGE or DESCRIPTION
This test is to keep track of recipes that do not have a HOMEPAGE or DESCRIPTION, with exceptions to recipes whose SRC_URI are not linked to external sources. Results of this test: it take about 2 to 3 minutes for this test to complete execution depending on the laptop used, Recipes that didn't have a homepage or description were found, and using list data structure instead of set() returned an ordered list of recipes that didn't have a homepage. Hence it's easier to view recipes with missing homepage and description. [YOCTO #13471] (From OE-Core rev: 5e0cfce7a126c194bfb7855952355c62eae3831a) Signed-off-by: Dorinda Bassey <dorindabassey@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
028fcc2348
commit
a6932c2203
@@ -40,6 +40,42 @@ 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
|
||||
|
||||
Reference in New Issue
Block a user