yocto-check-layer: Relax README case checks

Message ID 20211204200129.1573277-1-JPEWhacker@gmail.com
State Accepted, archived
Commit fdedf94d406ad3da85cb45d43ef87d3fdc8c14d4
Headers show
Series yocto-check-layer: Relax README case checks | expand

Commit Message

Joshua Watt Dec. 4, 2021, 8:01 p.m. UTC
Relaxes the case requirements for checks in the README file so that word
like "Maintainer" and "Patch" are allowed

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
---
 scripts/lib/checklayer/cases/common.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch

diff --git a/scripts/lib/checklayer/cases/common.py b/scripts/lib/checklayer/cases/common.py
index 52c786f77b..8bdc5ce20f 100644
--- a/scripts/lib/checklayer/cases/common.py
+++ b/scripts/lib/checklayer/cases/common.py
@@ -26,8 +26,8 @@  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)
+        self.assertIn('maintainer', data.lower())
+        self.assertIn('patch', data.lower())
         # Check that there is an email address in the README
         email_regex = re.compile(r"[^@]+@[^@]+")
         self.assertTrue(email_regex.match(data))