summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorJon Mason <jdmason@kudzu.us>2021-12-04 13:18:09 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-12-04 23:39:52 +0000
commit17d1c837a4ea98a6a83d88679cdcc168bb3ee427 (patch)
treef57596aa9aad044e9e7c278895d059d6c38e687c /scripts
parentaec629185efe563c361844049b1009bc99a4f4fc (diff)
downloadpoky-17d1c837a4ea98a6a83d88679cdcc168bb3ee427.tar.gz
yocto-check-layer: disregard checks if referencing another README file
It is permissible to have a layer's README reference another README. If this is the case, avoid other checks. Do this by checking for the word README (case insensitive) in the README file. This might be too permissive, but follows the pattern of looking for exact words (like "patch" or "maintainer") in READMEs. (From OE-Core rev: 443c73d638519d6a7ea44d1c0e80d76306687ddc) Signed-off-by: Jon Mason <jdmason@kudzu.us> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/checklayer/cases/common.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/lib/checklayer/cases/common.py b/scripts/lib/checklayer/cases/common.py
index 52c786f77b..fdfb5d18cd 100644
--- a/scripts/lib/checklayer/cases/common.py
+++ b/scripts/lib/checklayer/cases/common.py
@@ -26,7 +26,12 @@ class CommonCheckLayer(OECheckLayerTestCase):
26 data = f.read() 26 data = f.read()
27 self.assertTrue(data, 27 self.assertTrue(data,
28 msg="Layer contains a README file but it is empty.") 28 msg="Layer contains a README file but it is empty.")
29 self.assertIn('maintainer',data) 29
30 # If a layer's README references another README, then the checks below are not valid
31 if re.search('README', data, re.IGNORECASE):
32 return
33
34 self.assertIn('maintainer', data)
30 self.assertIn('patch',data) 35 self.assertIn('patch',data)
31 # Check that there is an email address in the README 36 # Check that there is an email address in the README
32 email_regex = re.compile(r"[^@]+@[^@]+") 37 email_regex = re.compile(r"[^@]+@[^@]+")