diff options
author | jmbills <jasonm.bills@yahoo.com> | 2021-06-02 20:10:10 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-02 20:10:10 +0300 |
commit | e7436234669703196c5ed56f33050d2dc19127cd (patch) | |
tree | 704eb802dc7b987411a0e44d128bdd8978745d8c /poky/meta/lib/oeqa/selftest/cases/distrodata.py | |
parent | 2ac88c6ae92b615338771db8a4fcbef91bee0947 (diff) | |
parent | 2a64b8ae9b952b18b4aef38cb7c41ce6dba16c50 (diff) | |
download | openbmc-e7436234669703196c5ed56f33050d2dc19127cd.tar.xz |
Update
Diffstat (limited to 'poky/meta/lib/oeqa/selftest/cases/distrodata.py')
-rw-r--r-- | poky/meta/lib/oeqa/selftest/cases/distrodata.py | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/poky/meta/lib/oeqa/selftest/cases/distrodata.py b/poky/meta/lib/oeqa/selftest/cases/distrodata.py index e1cfc3b62..fbc0c2a98 100644 --- a/poky/meta/lib/oeqa/selftest/cases/distrodata.py +++ b/poky/meta/lib/oeqa/selftest/cases/distrodata.py @@ -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 |