summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDhruva Gole <goledhruva@gmail.com>2021-11-30 11:13:35 +0530
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-12-02 17:20:12 +0000
commitd1a02ba034766b230705ffe638a453911bfe25e7 (patch)
treed29c8e87bef8e1f835e4f17908a60527d7717e76
parentcba8fe1bd5aa6bbb05e6d68f16ba0cf1106a32a5 (diff)
downloadpoky-master-next.zip
poky-master-next.tar.gz
poky-master-next.tar.bz2
yocto-check-layer: Add additional README checksmaster-next
This adds: - Test case to review if the README file specifies the maintainer. - Test case to review if the README file specifies the word patch. - Test case to review if the README file contains an email address. [YOCTO #11131] (From OE-Core rev: 74aa0754236614f16c7c30ba0705f12a903ecc44) Signed-off-by: Dhruva Gole <goledhruva@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--scripts/lib/checklayer/cases/common.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/lib/checklayer/cases/common.py b/scripts/lib/checklayer/cases/common.py
index 4495f71..52c786f 100644
--- a/scripts/lib/checklayer/cases/common.py
+++ b/scripts/lib/checklayer/cases/common.py
@@ -6,6 +6,7 @@
import glob
import os
import unittest
+import re
from checklayer import get_signatures, LayerType, check_command, get_depgraph, compare_signatures
from checklayer.case import OECheckLayerTestCase
@@ -25,6 +26,11 @@ class CommonCheckLayer(OECheckLayerTestCase):
data = f.read()
self.assertTrue(data,
msg="Layer contains a README file but it is empty.")
+ self.assertIn('maintainer',data)
+ self.assertIn('patch',data)
+ # Check that there is an email address in the README
+ email_regex = re.compile(r"[^@]+@[^@]+")
+ self.assertTrue(email_regex.match(data))
def test_parse(self):
check_command('Layer %s failed to parse.' % self.tc.layer['name'],