]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
yocto-check-layer: Fix README email check
authorRicardo Ungerer <ungerer.ricardo@gmail.com>
Tue, 20 Jan 2026 19:47:21 +0000 (19:47 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 22 Jan 2026 14:21:21 +0000 (14:21 +0000)
So far the test_readme have been use of re.match to find an email
address in the README file. This only matches if the email address
is at the start of the file. This commit changes this to re.search to
find email addresses anywhere in the README file.

Signed-off-by: Ricardo Ungerer <ungerer.ricardo@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/lib/checklayer/cases/common.py

index 011448143402ce25f5a61da52aa1094893aab8d3..9ea7592ba68a11122a9f9138b98dc90a68dcaef4 100644 (file)
@@ -39,7 +39,7 @@ class CommonCheckLayer(OECheckLayerTestCase):
         self.assertIn('patch', data.lower(), msg="No patching information found in README.")
         # Check that there is an email address in the README
         email_regex = re.compile(r"[^@]+@[^@]+")
-        self.assertTrue(email_regex.match(data), msg="No email address found in README.")
+        self.assertTrue(email_regex.search(data), msg="No email address found in README.")
 
     def find_file_by_name(self, globs):
         """