diff options
author | Alexander Kanavin <alex.kanavin@gmail.com> | 2023-07-27 16:36:10 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-07-30 09:16:52 +0100 |
commit | ba961128e2d7d1b4c15daf749ea878efa5cf5da6 (patch) | |
tree | 468d5e13ed336e6a00bd48754efe202421437546 /meta/lib/oeqa/selftest/cases/distrodata.py | |
parent | 2c7a4a80215a64934d64c3fe16b139925fed2a86 (diff) | |
download | poky-ba961128e2d7d1b4c15daf749ea878efa5cf5da6.tar.gz |
insane.bbclass: add a SUMMARY/HOMEPAGE check (oe-core recipes only)
This was done in a selftest, but that is too late and creates
friction in integration as errors are not seen until autobuilder fails.
Bonus fix: SUMMARY check wasn't even working, as in the absence
of one set in the recipe there is a default value set from bitbake.conf.
I left DESCRIPTION check out for now, as many recipes don't actually
have it, and it's set from SUMMARY (plus a dot) if absent.
(From OE-Core rev: 4144c2f43da39336b03cfd612cbe1694cbf8c7bd)
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/selftest/cases/distrodata.py')
-rw-r--r-- | meta/lib/oeqa/selftest/cases/distrodata.py | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/meta/lib/oeqa/selftest/cases/distrodata.py b/meta/lib/oeqa/selftest/cases/distrodata.py index 111bd3c9be..ad952c004b 100644 --- a/meta/lib/oeqa/selftest/cases/distrodata.py +++ b/meta/lib/oeqa/selftest/cases/distrodata.py | |||
@@ -39,42 +39,6 @@ but their recipes claim otherwise by setting UPSTREAM_VERSION_UNKNOWN. Please re | |||
39 | """ + "\n".join(regressed_successes) | 39 | """ + "\n".join(regressed_successes) |
40 | self.assertTrue(len(regressed_failures) == 0 and len(regressed_successes) == 0, msg) | 40 | self.assertTrue(len(regressed_failures) == 0 and len(regressed_successes) == 0, msg) |
41 | 41 | ||
42 | def test_missing_homepg(self): | ||
43 | """ | ||
44 | Summary: Test for oe-core recipes that don't have a HOMEPAGE or DESCRIPTION | ||
45 | Expected: All oe-core recipes should have a DESCRIPTION entry | ||
46 | Expected: All oe-core recipes should have a HOMEPAGE entry except for recipes that are not fetched from external sources. | ||
47 | Product: oe-core | ||
48 | """ | ||
49 | with bb.tinfoil.Tinfoil() as tinfoil: | ||
50 | tinfoil.prepare(config_only=False) | ||
51 | no_description = [] | ||
52 | no_homepage = [] | ||
53 | for fn in tinfoil.all_recipe_files(variants=False): | ||
54 | if not '/meta/recipes-' in fn: | ||
55 | # We are only interested in OE-Core | ||
56 | continue | ||
57 | rd = tinfoil.parse_recipe_file(fn, appends=False) | ||
58 | pn = rd.getVar('BPN') | ||
59 | srcfile = rd.getVar('SRC_URI').split() | ||
60 | #Since DESCRIPTION defaults to SUMMARY if not set, we are only interested in recipes without DESCRIPTION or SUMMARY | ||
61 | if not (rd.getVar('SUMMARY') or rd.getVar('DESCRIPTION')): | ||
62 | no_description.append((pn, fn)) | ||
63 | if not rd.getVar('HOMEPAGE'): | ||
64 | if srcfile and srcfile[0].startswith('file') or not rd.getVar('SRC_URI'): | ||
65 | # We are only interested in recipes SRC_URI fetched from external sources | ||
66 | continue | ||
67 | no_homepage.append((pn, fn)) | ||
68 | if no_homepage: | ||
69 | self.fail(""" | ||
70 | The following recipes do not have a HOMEPAGE. Please add an entry for HOMEPAGE in the recipe. | ||
71 | """ + "\n".join(['%s (%s)' % i for i in no_homepage])) | ||
72 | |||
73 | if no_description: | ||
74 | self.fail(""" | ||
75 | The following recipes do not have a DESCRIPTION. Please add an entry for DESCRIPTION in the recipe. | ||
76 | """ + "\n".join(['%s (%s)' % i for i in no_description])) | ||
77 | |||
78 | def test_maintainers(self): | 42 | def test_maintainers(self): |
79 | """ | 43 | """ |
80 | Summary: Test that oe-core recipes have a maintainer and entries in maintainers list have a recipe | 44 | Summary: Test that oe-core recipes have a maintainer and entries in maintainers list have a recipe |